---
title: "SM Tables, Figures, and Stats"
author: "Kaylyn Jackson Schiff, Daniel Schiff, and Natalia Bueno"
date: "2022"
output: pdf_document
editor_options: 
  chunk_output_type: console
---

#####Setup Chunk#####
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(rmarkdown)
library(tidyverse)
library(gridExtra)
library(xtable)
library(stargazer)
library(estimatr)
library(regrrr)
library(dotwhisker)
library(interplot)
library(sandwich)
library(ggpubr)
library(meta)
library(RColorBrewer)
library(rstatix)
library(cowplot)
options(scipen=999)

base_dir <- getwd()
```


#####Read in the Data
```{r read in data}
load("data/pilot_clean.RData") 
ld1 <- readRDS("data/df_clean.rds")
ld2 <- readRDS("data/df_followup_clean.rds")
ld3 <- readRDS("data/df_followup2_clean.rds")
ld4 <- readRDS("data/df_study4_clean.rds")
ld5 <- readRDS("data/df_study5_clean.rds")

ld1$treatment <- if_else(ld1$alleg_treatment == "Info. Uncertain" | ld1$alleg_treatment == "Opp. Rally", 1, 0)
ld4$treatment <- if_else(ld4$alleg_treatment == "Info. Uncertain" | ld4$alleg_treatment == "Opp. Rally", 1, 0)
ld5$treatment <- if_else(ld5$alleg_treatment == "Info. Uncertain" | ld5$alleg_treatment == "Opp. Rally", 1, 0)
```


#####Table B1: Covariate Balance for Study 1
```{r study 1 balance}
#Table B1
ld1$video <- if_else(ld1$media_format=="Video", 1, 0)
options(dplyr.summarise.inform = FALSE)
vars <- c("party", "gender", "race", "age", "education", "income", "region")
ld1 <- ld1 %>% mutate(treatment = case_when(alleg_treatment=="Control" & video==1 ~ "Control Video",
                                          alleg_treatment=="Info. Uncertain" & video==1 ~ "IU Video", 
                                          alleg_treatment=="Opp. Rally" & video==1 ~ "OR Video",
                                          alleg_treatment=="Control" & video==0 ~ "Control Text",
                                          alleg_treatment=="Info. Uncertain" & video==0 ~ "IU Text",
                                          alleg_treatment=="Opp. Rally" & video==0 ~ "OR Text"))
summarize_groups <- function(var){
  df <- split(ld1, ld1[[var]])
  summary <- map_df(df, ~ .x %>% group_by(treatment) %>% summarize(n = n(), level = unique(.data[[var]]))) %>% 
    dplyr::select(treatment, n, level) %>% 
    ungroup %>% 
    pivot_wider(names_from = treatment, values_from = n) %>% 
    mutate(variable = var, level = as.character(level))
  summary <- summary %>% dplyr::select(-variable)
  summary[,-1] <- lapply(summary[,-1], function(x) x/sum(x, na.rm=T))
  return(summary)
}
balance_tab <- map_df(vars, ~summarize_groups(.x))
balance_tab <- balance_tab %>% dplyr::select("Variable Level" = level, `Control Text`, `Control Video`, `IU Text`, `IU Video`, `OR Text`, `OR Video`)
media_literacy <- c("Media literacy", mean(ld1$media_literacy[ld1$treatment=="Control Text"]),
                    mean(ld1$media_literacy[ld1$treatment=="Control Video"]),
                    mean(ld1$media_literacy[ld1$treatment=="IU Text"]),
                    mean(ld1$media_literacy[ld1$treatment=="IU Video"]),
                    mean(ld1$media_literacy[ld1$treatment=="OR Text"]),
                    mean(ld1$media_literacy[ld1$treatment=="OR Video"]))
digital_literacy <- c("Digital literacy", mean(ld1$digital_literacy[ld1$treatment=="Control Text"]),
                    mean(ld1$digital_literacy[ld1$treatment=="Control Video"]),
                    mean(ld1$digital_literacy[ld1$treatment=="IU Text"]),
                    mean(ld1$digital_literacy[ld1$treatment=="IU Video"]),
                    mean(ld1$digital_literacy[ld1$treatment=="OR Text"]),
                    mean(ld1$digital_literacy[ld1$treatment=="OR Video"]))
balance_tab <- rbind(balance_tab, media_literacy, digital_literacy)
balance_tab$`Control Text` <- as.numeric(balance_tab$`Control Text`)
balance_tab$`Control Video` <- as.numeric(balance_tab$`Control Video`)
balance_tab$`IU Text` <- as.numeric(balance_tab$`IU Text`)
balance_tab$`IU Video` <- as.numeric(balance_tab$`IU Video`)
balance_tab$`OR Text` <- as.numeric(balance_tab$`OR Text`)
balance_tab$`OR Video` <- as.numeric(balance_tab$`OR Video`)
print(xtable(balance_tab, digits=2, caption="Covariate Balance for Study 1", label="tab:covariate_balance_wave_one"), include.rownames=F, file=file.path(base_dir, "Tables/balance_study1.tex"), caption.placement="top", size="\\tiny")


#F-tests to assess randomization and covariate balance in Study 1
ld1$video <- if_else(ld1$media_format == "Video", 1, 0)
ld1$control <- if_else(ld1$alleg_treatment == "Control", 1, 0)
ld1$IU <- if_else(ld1$alleg_treatment == "Info. Uncertain", 1, 0)
ld1$OR <- if_else(ld1$alleg_treatment == "Opp. Rally", 1, 0)

f.test.control <- lm_robust(control ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld1)
glance(f.test.control)$p.value #0.973

f.test.IU <- lm_robust(IU ~  party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld1)
glance(f.test.IU)$p.value #0.8686534

f.test.OR <- lm_robust(OR ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld1)
glance(f.test.OR)$p.value #0.923

f.test.video <- lm_robust(video ~  party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld1)
glance(f.test.video)$p.value #0.662

```


#####Table B2: Covariate Balance for Study 2
```{r study 2 balance}
#Table B2
options(dplyr.summarise.inform = FALSE)
vars <- c("party", "gender", "race", "age", "education", "income", "region")
ld2 <- ld2 %>% mutate(treatment = case_when(alleg_treatment_1=="Control" & alleg_treatment_2=="Control" ~ "Control + Control",
                                          alleg_treatment_1=="Info. Uncertain" & alleg_treatment_2=="Control" ~ "IU + Control", 
                                          alleg_treatment_1=="Fact Check" & alleg_treatment_2=="Control" ~ "FC + Control",
                                          alleg_treatment_1=="Control" & alleg_treatment_2=="Opp. Rally" ~ "Control + OR",
                                          alleg_treatment_1=="Info. Uncertain" & alleg_treatment_2=="Opp. Rally" ~ "IU + OR",
                                          alleg_treatment_1=="Fact Check" & alleg_treatment_2=="Opp. Rally" ~ "FC + OR"))

summarize_groups <- function(var){
  df <- split(ld2, ld2[[var]])
  summary <- map_df(df, ~ .x %>% group_by(treatment) %>% summarize(n = n(), level = unique(.data[[var]]))) %>% 
    dplyr::select(treatment, n, level) %>% 
    ungroup %>% 
    pivot_wider(names_from = treatment, values_from = n) %>% 
    mutate(variable = var, level = as.character(level))
  summary <- summary %>% dplyr::select(-variable)
  summary[,-1] <- lapply(summary[,-1], function(x) x/sum(x, na.rm=T))
  return(summary)
}
balance_tab <- map_df(vars, ~summarize_groups(.x))
colnames(balance_tab)[1] <- "Variable Level"
media_literacy <- c("Media literacy", mean(ld2$media_literacy[ld2$treatment=="Control + Control"]),
                    mean(ld2$media_literacy[ld2$treatment=="Control + OR"]),
                    mean(ld2$media_literacy[ld2$treatment=="FC + Control"]),
                    mean(ld2$media_literacy[ld2$treatment=="FC + OR"]),
                    mean(ld2$media_literacy[ld2$treatment=="IU + Control"]),
                    mean(ld2$media_literacy[ld2$treatment=="IU + OR"]))
digital_literacy <- c("Digital literacy", mean(ld2$digital_literacy[ld2$treatment=="Control + Control"]),
                    mean(ld2$digital_literacy[ld2$treatment=="Control + OR"]),
                    mean(ld2$digital_literacy[ld2$treatment=="FC + Control"]),
                    mean(ld2$digital_literacy[ld2$treatment=="FC + OR"]),
                    mean(ld2$digital_literacy[ld2$treatment=="IU + Control"]),
                    mean(ld2$digital_literacy[ld2$treatment=="IU + OR"]))
balance_tab <- rbind(balance_tab, media_literacy, digital_literacy)
balance_tab$`Control + Control` <- as.numeric(balance_tab$`Control + Control`)
balance_tab$`Control + OR` <- as.numeric(balance_tab$`Control + OR`)
balance_tab$`FC + Control` <- as.numeric(balance_tab$`FC + Control`)
balance_tab$`FC + OR` <- as.numeric(balance_tab$`FC + OR`)
balance_tab$`IU + Control` <- as.numeric(balance_tab$`IU + Control`)
balance_tab$`IU + OR` <- as.numeric(balance_tab$`IU + OR`)
print(xtable(balance_tab, digits=2, caption="Covariate Balance for Study 2", label="tab:covariate_balance_wave_two"), include.rownames=F, file=file.path(base_dir, "Tables/balance_study2.tex"), caption.placement="top", size="\\tiny")


#F-tests to assess randomization and covariate balance in Study 2
ld2$control_1 <- if_else(ld2$alleg_treatment_1 == "Control", 1, 0)
ld2$IU <- if_else(ld2$alleg_treatment_1 == "Info. Uncertain", 1, 0)
ld2$FC <- if_else(ld2$alleg_treatment_1 == "Fact Check", 1, 0)
ld2$OR <- if_else(ld2$alleg_treatment_2 == "Opp. Rally", 1, 0)

f.test.control.exp1 <- lm_robust(control_1 ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld2)
glance(f.test.control.exp1)$p.value #0.621

f.test.IU <- lm_robust(IU ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld2) 
glance(f.test.IU)$p.value #0.801

f.test.FC <- lm_robust(FC ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld2) 
glance(f.test.FC)$p.value #0.362

f.test.OR <- lm_robust(OR ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld2) 
glance(f.test.OR)$p.value #0.676

```


#####Table B3: Covariate Balance for Study 3
```{r study 3 balance}
#Table B3
options(dplyr.summarise.inform = FALSE)
vars <- c("party", "gender", "race", "age", "education", "income", "region")
summarize_groups <- function(var){
  df <- split(ld3, ld3[[var]])
  summary <- map_df(df, ~ .x %>% group_by(alleg_treatment) %>% summarize(n = n(), level = unique(.data[[var]]))) %>% 
    dplyr::select(alleg_treatment, n, level) %>% 
    ungroup %>% 
    pivot_wider(names_from = alleg_treatment, values_from = n) %>% 
    mutate(variable = var, level = as.character(level))
  summary <- summary %>% dplyr::select(-variable)
  summary[,-1] <- lapply(summary[,-1], function(x) x/sum(x, na.rm=T))
  return(summary)
}
balance_tab <- map_df(vars, ~summarize_groups(.x))
balance_tab <- balance_tab %>% dplyr::select("Variable Level" = level, `Info. Uncertain`, `Simple Denial`, `Apology`)
media_literacy <- c("Media literacy", mean(ld3$media_literacy[ld3$alleg_treatment=="Info. Uncertain"]),
                    mean(ld3$media_literacy[ld3$alleg_treatment=="Simple Denial"]),
                    mean(ld3$media_literacy[ld3$alleg_treatment=="Apology"]))
digital_literacy <- c("Digital literacy", mean(ld3$digital_literacy[ld3$alleg_treatment=="Info. Uncertain"]),
                    mean(ld3$digital_literacy[ld3$alleg_treatment=="Simple Denial"]),
                    mean(ld3$digital_literacy[ld3$alleg_treatment=="Apology"]))
balance_tab <- rbind(balance_tab, media_literacy, digital_literacy)
balance_tab$`Info. Uncertain` <- as.numeric(balance_tab$`Info. Uncertain`)
balance_tab$`Simple Denial` <- as.numeric(balance_tab$`Simple Denial`)
balance_tab$`Apology` <- as.numeric(balance_tab$`Apology`)
print(xtable(balance_tab, digits=2, caption="Covariate Balance for Study 3", label="tab:covariate_balance_wave_three"), include.rownames=F, file=file.path(base_dir, "Tables/balance_study3.tex"), caption.placement="top", size="\\tiny")


#F-tests to assess randomization and covariate balance in Study 3
ld3$IU <- if_else(ld3$alleg_treatment == "Info. Uncertain", 1, 0)
ld3$denial <- if_else(ld3$alleg_treatment == "Simple Denial", 1, 0)
ld3$apology <- if_else(ld3$alleg_treatment == "Apology", 1, 0)

f.test.apology <- lm_robust(apology ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld3) 
glance(f.test.apology)$p.value #0.703

f.test.denial <- lm_robust(denial ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld3) 
glance(f.test.denial)$p.value #0.231

f.test.IU <- lm_robust(IU ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld3)
glance(f.test.IU)$p.value #]0.130

```


#####Table B4: Covariate Balance for Study 4
```{r balance}
#Table B4
ld4$video <- if_else(ld4$media_format=="Video", 1, 0)
options(dplyr.summarise.inform = FALSE)
vars <- c("party", "gender", "race", "age", "education", "income", "region")
ld4 <- ld4 %>% mutate(treatment = case_when(alleg_treatment=="Control" & video==1 ~ "Control Video",
                                          alleg_treatment=="Info. Uncertain" & video==1 ~ "IU Video", 
                                          alleg_treatment=="Opp. Rally" & video==1 ~ "OR Video",
                                          alleg_treatment=="Control" & video==0 ~ "Control Text",
                                          alleg_treatment=="Info. Uncertain" & video==0 ~ "IU Text",
                                          alleg_treatment=="Opp. Rally" & video==0 ~ "OR Text"))
summarize_groups <- function(var){
  df <- split(ld4, ld4[[var]])
  summary <- map_df(df, ~ .x %>% group_by(treatment) %>% summarize(n = n(), level = unique(.data[[var]]))) %>% 
    dplyr::select(treatment, n, level) %>% 
    ungroup %>% 
    pivot_wider(names_from = treatment, values_from = n) %>% 
    mutate(variable = var, level = as.character(level))
  summary <- summary %>% dplyr::select(-variable)
  summary[,-1] <- lapply(summary[,-1], function(x) x/sum(x, na.rm=T))
  return(summary)
}
balance_tab <- map_df(vars, ~summarize_groups(.x))
balance_tab <- balance_tab %>% dplyr::select("Variable Level" = level, `Control Text`, `Control Video`, `IU Text`, `IU Video`, `OR Text`, `OR Video`)
media_literacy <- c("Media literacy", mean(ld4$media_literacy[ld4$treatment=="Control Text"]),
                    mean(ld4$media_literacy[ld4$treatment=="Control Video"]),
                    mean(ld4$media_literacy[ld4$treatment=="IU Text"]),
                    mean(ld4$media_literacy[ld4$treatment=="IU Video"]),
                    mean(ld4$media_literacy[ld4$treatment=="OR Text"]),
                    mean(ld4$media_literacy[ld4$treatment=="OR Video"]))
digital_literacy <- c("Digital literacy", mean(ld4$digital_literacy[ld4$treatment=="Control Text"]),
                    mean(ld4$digital_literacy[ld4$treatment=="Control Video"]),
                    mean(ld4$digital_literacy[ld4$treatment=="IU Text"]),
                    mean(ld4$digital_literacy[ld4$treatment=="IU Video"]),
                    mean(ld4$digital_literacy[ld4$treatment=="OR Text"]),
                    mean(ld4$digital_literacy[ld4$treatment=="OR Video"]))
balance_tab <- rbind(balance_tab, media_literacy, digital_literacy)
balance_tab$`Control Text` <- as.numeric(balance_tab$`Control Text`)
balance_tab$`Control Video` <- as.numeric(balance_tab$`Control Video`)
balance_tab$`IU Text` <- as.numeric(balance_tab$`IU Text`)
balance_tab$`IU Video` <- as.numeric(balance_tab$`IU Video`)
balance_tab$`OR Text` <- as.numeric(balance_tab$`OR Text`)
balance_tab$`OR Video` <- as.numeric(balance_tab$`OR Video`)
print(xtable(balance_tab, digits=2, caption="Covariate Balance for Study 4", label="tab:covariate_balance_wave_four"), include.rownames=F, file=file.path(base_dir, "Tables/balance_study4.tex"), caption.placement="top", size="\\tiny")


#F-tests to assess randomization and covariate balance in Study 4
ld4$video <- if_else(ld4$media_format == "Video", 1, 0)
ld4$control <- if_else(ld4$alleg_treatment == "Control", 1, 0)
ld4$IU <- if_else(ld4$alleg_treatment == "Info. Uncertain", 1, 0)
ld4$OR <- if_else(ld4$alleg_treatment == "Opp. Rally", 1, 0)

f.test.control <- lm_robust(control ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld4)
glance(f.test.control)$p.value #0.057

f.test.IU <- lm_robust(IU ~  party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld4)
glance(f.test.IU)$p.value #0.332

f.test.OR <- lm_robust(OR ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld4)
glance(f.test.OR)$p.value #0.120

f.test.video <- lm_robust(video ~  party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld4)
glance(f.test.video)$p.value #0.941
```


#####Table B5: Covariate Balance for Study 5
```{r balance}
#Table B5
options(dplyr.summarise.inform = FALSE)
vars <- c("party", "gender", "race", "age", "education", "income", "region")
ld5 <- ld5 %>% mutate(treatment = case_when(alleg_treatment=="Control" ~ "Control",
                                          alleg_treatment=="Info. Uncertain" ~ "IU", 
                                          alleg_treatment=="Opp. Rally" ~ "OR"))
summarize_groups <- function(var){
  df <- split(ld5, ld5[[var]])
  summary <- map_df(df, ~ .x %>% group_by(treatment) %>% summarize(n = n(), level = unique(.data[[var]]))) %>% 
    dplyr::select(treatment, n, level) %>% 
    ungroup %>% 
    pivot_wider(names_from = treatment, values_from = n) %>% 
    mutate(variable = var, level = as.character(level))
  summary <- summary %>% dplyr::select(-variable)
  summary[,-1] <- lapply(summary[,-1], function(x) x/sum(x, na.rm=T))
  return(summary)
}
balance_tab <- map_df(vars, ~summarize_groups(.x))
balance_tab <- balance_tab %>% dplyr::select("Variable Level" = level, `Control`, `IU`, `OR`)
media_literacy <- c("Media literacy", mean(ld5$media_literacy[ld5$treatment=="Control"]),
                    mean(ld5$media_literacy[ld5$treatment=="IU"]),
                    mean(ld5$media_literacy[ld5$treatment=="OR"]))
digital_literacy <- c("Digital literacy", mean(ld5$digital_literacy[ld5$treatment=="Control"]),
                    mean(ld5$digital_literacy[ld5$treatment=="IU"]),
                    mean(ld5$digital_literacy[ld5$treatment=="OR"]))
balance_tab <- rbind(balance_tab, media_literacy, digital_literacy)
balance_tab$`Control` <- as.numeric(balance_tab$`Control`)
balance_tab$`IU` <- as.numeric(balance_tab$`IU`)
balance_tab$`OR` <- as.numeric(balance_tab$`OR`)
print(xtable(balance_tab, digits=2, caption="Covariate Balance for Study 5", label="tab:covariate_balance_wave_five"), include.rownames=F, file=file.path(base_dir, "Tables/balance_study5.tex"), caption.placement="top", size="\\tiny")


#F-tests to assess randomization and covariate balance in Study 5
ld5$control <- if_else(ld5$alleg_treatment == "Control", 1, 0)
ld5$IU <- if_else(ld5$alleg_treatment == "Info. Uncertain", 1, 0)
ld5$OR <- if_else(ld5$alleg_treatment == "Opp. Rally", 1, 0)

f.test.control <- lm_robust(control ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld5)
glance(f.test.control)$p.value #0.150

f.test.IU <- lm_robust(IU ~  party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld5)
glance(f.test.IU)$p.value #0.438

f.test.OR <- lm_robust(OR ~ party + gender + race + age + education + income + region + media_literacy + digital_literacy, data = ld5)
glance(f.test.OR)$p.value #0.590

```


#####Recoding Treatment
```{r recoding treat}

ld1$treatment <- if_else(ld1$alleg_treatment == "Info. Uncertain" | ld1$alleg_treatment == "Opp. Rally", 1, 0)
ld4$treatment <- if_else(ld4$alleg_treatment == "Info. Uncertain" | ld4$alleg_treatment == "Opp. Rally", 1, 0)
ld5$treatment <- if_else(ld5$alleg_treatment == "Info. Uncertain" | ld5$alleg_treatment == "Opp. Rally", 1, 0)

```


#####Table A1: Representativeness of Samples
```{r represent}
#Table A1
df_names <- readRDS("data/lucid_sample_2.23.21.rds") %>% names()
ld1_raw <- readRDS("data/lucid_sample_2.23.21.rds")

df_names <- readRDS("data/lucid_sample_5.3.21.rds") %>% names()
ld2_raw <- readRDS("data/lucid_sample_5.3.21.rds")

df_names <- readRDS("data/lucid_sample_study_3_10.25.21.rds") %>% names()
ld3_raw <- readRDS("data/lucid_sample_study_3_10.25.21.rds")

# df_names <- read_csv("data/prolific_sample_11.28.22.csv", n_max = 0) %>% names() #not replicable because of PII
# ld4_raw <- read_csv("data/prolific_sample_11.28.22.csv", col_names = df_names, skip = 3) #not replicable because of PII
# df_cov_1 <- read.csv("data/prolific_demos_1.csv") #not replicable because of PII
# df_cov_2 <- read.csv("data/prolific_demos_2.csv") #not replicable because of PII
# df_cov_3 <- read.csv("data/prolific_demos_3.csv") #not replicable because of PII
# df_cov <- rbind(df_cov_1, df_cov_2, df_cov_3) #not replicable because of PII
# ld4_raw <- ld4_raw %>% left_join(df_cov, by = c("PROLIFIC_PID" = "Participant.id")) #not replicable because of PII
# ld4_raw$Age <- as.numeric(as.character(ld4_raw$Age)) #not replicable because of PII
#ld4_raw <- ld4_raw %>% select(-PROLIFIC_PID)
#saveRDS(ld4_raw, file = "data/ld4_raw.rds")
df_names <- readRDS("data/ld4_raw.rds") %>% names() 
ld4_raw <- readRDS("data/ld4_raw.rds") 

df_names <- readRDS("data/lucid_sample_11.28.22.rds") %>% names()
ld5_raw <- readRDS("data/lucid_sample_11.28.22.rds")

vars <- c("Median Age", "Female", "White", "Black", "Asian", "Hispanic", "Northeast", "Midwest", "South", "West", "Democrat", "Republican", "Independent/Other")
us_pop <- c(38, 0.51, 0.76, 0.13, 0.06, 0.19, 0.17, 0.21, 0.38, 0.24, 0.30, 0.28, 0.40)
study1 <- c(median(ld1_raw$age), 
            length(which(ld1$gender=="Female"))/nrow(ld1),
            length(which(ld1$race=="White"))/nrow(ld1),
            length(which(ld1$race=="Black"))/nrow(ld1),
            length(which(ld1$race=="Asian"))/nrow(ld1),
            length(which(ld1$race=="Hispanic"))/nrow(ld1),
            length(which(ld1$region=="Northeast"))/nrow(ld1),
            length(which(ld1$region=="Midwest"))/nrow(ld1),
            length(which(ld1$region=="South"))/nrow(ld1),
            length(which(ld1$region=="West"))/nrow(ld1),
            length(which(ld1$pre_party_3=="Democrat"))/nrow(ld1),
            length(which(ld1$pre_party_3=="Republican"))/nrow(ld1),
            length(which(ld1$pre_party_3=="Independent"))/nrow(ld1))
study2 <- c(median(ld2_raw$age), 
            length(which(ld2$gender=="Female"))/nrow(ld2),
            length(which(ld2$race=="White"))/nrow(ld2),
            length(which(ld2$race=="Black"))/nrow(ld2),
            length(which(ld2$race=="Asian"))/nrow(ld2),
            length(which(ld2$race=="Hispanic"))/nrow(ld2),
            length(which(ld2$region=="Northeast"))/nrow(ld2),
            length(which(ld2$region=="Midwest"))/nrow(ld2),
            length(which(ld2$region=="South"))/nrow(ld2),
            length(which(ld2$region=="West"))/nrow(ld2),
            length(which(ld2$pre_party_3=="Democrat"))/nrow(ld2),
            length(which(ld2$pre_party_3=="Republican"))/nrow(ld2),
            length(which(ld2$pre_party_3=="Independent"))/nrow(ld2))
study3 <- c(median(ld3_raw$age), 
            length(which(ld3$gender=="Female"))/nrow(ld3),
            length(which(ld3$race=="White"))/nrow(ld3),
            length(which(ld3$race=="Black"))/nrow(ld3),
            length(which(ld3$race=="Asian"))/nrow(ld3),
            length(which(ld3$race=="Hispanic"))/nrow(ld3),
            length(which(ld3$region=="Northeast"))/nrow(ld3),
            length(which(ld3$region=="Midwest"))/nrow(ld3),
            length(which(ld3$region=="South"))/nrow(ld3),
            length(which(ld3$region=="West"))/nrow(ld3),
            length(which(ld3$pre_party_3=="Democrat"))/nrow(ld3),
            length(which(ld3$pre_party_3=="Republican"))/nrow(ld3),
            length(which(ld3$pre_party_3=="Independent"))/nrow(ld3))
study4 <- c(median(ld4_raw$Age, na.rm=T), 
            length(which(ld4$gender=="Female"))/nrow(ld4),
            length(which(ld4$race=="White"))/nrow(ld4),
            length(which(ld4$race=="Black"))/nrow(ld4),
            length(which(ld4$race=="Asian"))/nrow(ld4),
            length(which(ld4$race=="Hispanic"))/nrow(ld4),
            length(which(ld4$region=="Northeast"))/nrow(ld4),
            length(which(ld4$region=="Midwest"))/nrow(ld4),
            length(which(ld4$region=="South"))/nrow(ld4),
            length(which(ld4$region=="West"))/nrow(ld4),
            length(which(ld4$party_3=="Democrat"))/nrow(ld4),
            length(which(ld4$party_3=="Republican"))/nrow(ld4),
            length(which(ld4$party_3=="Independent"))/nrow(ld4))
study5 <- c(median(ld5_raw$age), 
            length(which(ld5$gender=="Female"))/nrow(ld5),
            length(which(ld5$race=="White"))/nrow(ld5),
            length(which(ld5$race=="Black"))/nrow(ld5),
            length(which(ld5$race=="Asian"))/nrow(ld5),
            length(which(ld5$race=="Hispanic"))/nrow(ld5),
            length(which(ld5$region=="Northeast"))/nrow(ld5),
            length(which(ld5$region=="Midwest"))/nrow(ld5),
            length(which(ld5$region=="South"))/nrow(ld5),
            length(which(ld5$region=="West"))/nrow(ld5),
            length(which(ld5$pre_party_3=="Democrat"))/nrow(ld5),
            length(which(ld5$pre_party_3=="Republican"))/nrow(ld5),
            length(which(ld5$pre_party_3=="Independent"))/nrow(ld5))

rep_data <- as.data.frame(cbind(vars, us_pop, study1, study2, study3, study4, study5))
colnames(rep_data) <- c("Demographic", "US Population", "Study 1 Sample", "Study 2 Sample", "Study 3 Sample", "Study 4 Sample", "Study 5 Sample")
rep_data[,2:7] <- apply(rep_data[,2:7], as.numeric, MARGIN = 2)
rep_data <- rep_data %>% mutate_if(is.numeric, round, digits=2)
print(xtable(rep_data, digits=2, caption="Representativeness of Samples", label="tab:lucid_represent"), include.rownames=F, file=file.path(base_dir, "Tables/lucid_represent.tex"), caption.placement="top", size="\\scriptsize")

```


#####Figure A1: Time Spent on Surveys
```{r duration histograms}
#Figure A1
#Read in raw data
# df_names <- read_csv("data/lucid_sample_2.23.21.csv", n_max = 0) %>% names()
# df_raw <- read_csv("data/lucid_sample_2.23.21.csv", col_names = df_names, skip = 3)
# df1 <- df_raw %>% filter(Finished==1)
df_raw <- readRDS("data/lucid_sample_2.23.21.rds")
df1 <- df_raw %>% filter(Finished==1)

#df_names <- read_csv("data/lucid_sample_5.3.21.csv", n_max = 0) %>% names()
#df_raw <- read_csv("data/lucid_sample_5.3.21.csv", col_names = df_names, skip = 3)
df_raw <- readRDS("data/lucid_sample_5.3.21.rds")
df2 <- df_raw %>% filter(Finished==1)

#df_names <- read_csv("data/lucid_sample_study_3_10.25.21.csv", n_max = 0) %>% names()
#df_raw <- read_csv("data/lucid_sample_study_3_10.25.21.csv", col_names = df_names, skip = 3)
df_raw <- readRDS("data/lucid_sample_study_3_10.25.21.rds")
df3 <- df_raw %>% filter(Finished==1)

#df_names <- read_csv("data/prolific_sample_11.28.22.csv", n_max = 0) %>% names()
#df_raw <- read_csv("data/prolific_sample_11.28.22.csv", col_names = df_names, skip = 3)
df_raw <- readRDS("data/prolific_sample_11.28.22.rds")
df4 <- df_raw %>% filter(Finished==1)

#df_names <- read_csv("data/lucid_sample_11.28.22.csv", n_max = 0) %>% names()
#df_raw <- read_csv("data/lucid_sample_11.28.22.csv", col_names = df_names, skip = 3)
df_raw <- readRDS("data/lucid_sample_11.28.22.rds")
df5 <- df_raw %>% filter(Finished==1)

#Duration in minutes
df1$duration <- df1$`Duration (in seconds)`/60
df2$duration <- df2$`Duration (in seconds)`/60
df3$duration <- df3$`Duration (in seconds)`/60
df4$duration <- df4$`Duration (in seconds)`/60
df5$duration <- df5$`Duration (in seconds)`/60

#Top coded at 30 minutes
df1$duration <- if_else(df1$duration>30, 30, df1$duration)
df2$duration <- if_else(df2$duration>30, 30, df2$duration)
df3$duration <- if_else(df3$duration>30, 30, df3$duration)
df4$duration <- if_else(df4$duration>30, 30, df4$duration)
df5$duration <- if_else(df5$duration>30, 30, df5$duration)

study1_histogram <- ggplot(df1, aes(x=duration)) + geom_histogram(binwidth = 1, color="black", alpha=0.5) + xlim(0,30) + 
  xlab("Duration (in minutes)") + ylab("Count") + ggtitle("Study 1") + theme_bw()
study2_histogram <- ggplot(df2, aes(x=duration)) + geom_histogram(binwidth = 1, color="black", alpha=0.5) + xlim(0,30) + 
  xlab("Duration (in minutes)") + ylab("Count") + ggtitle("Study 2") + theme_bw()
study3_histogram <- ggplot(df3, aes(x=duration)) + geom_histogram(binwidth = 1, color="black", alpha=0.5) + xlim(0,30) + 
  xlab("Duration (in minutes)") + ylab("Count") + ggtitle("Study 3") + theme_bw()
study4_histogram <- ggplot(df4, aes(x=duration)) + geom_histogram(binwidth = 1, color="black", alpha=0.5) + xlim(0,30) + 
  xlab("Duration (in minutes)") + ylab("Count") + ggtitle("Study 4") + theme_bw()
study5_histogram <- ggplot(df5, aes(x=duration)) + geom_histogram(binwidth = 1, color="black", alpha=0.5) + xlim(0,30) + 
  xlab("Duration (in minutes)") + ylab("Count") + ggtitle("Study 5") + theme_bw()

pdf(file.path(base_dir, "Figures/duration_histograms.pdf"), width = 8, height = 8)
plot_grid(study1_histogram, study2_histogram, study3_histogram, study4_histogram, study5_histogram, nrow=2, ncol=3)
dev.off()


#Assessing attentiveness rates across studies
length(which(ld1$attentiveness==2))/nrow(ld1)*100 #44%
length(which(ld2$attentiveness==2))/nrow(ld2)*100 #39%
length(which(ld3$attentiveness==2))/nrow(ld3)*100 #41%
length(which(ld4$attentiveness==2))/nrow(ld4)*100 #96%
length(which(ld5$attentiveness==2))/nrow(ld5)*100 #37%

#Proportion greater than 3 minutes for Studies 1, 3, 4, and 5, and 5 minutes for Study 2
#Benchmarks for reasonable time spent on surveys
length(which(df1$duration>3))/nrow(df1)*100 #69%
length(which(df3$duration>3))/nrow(df3)*100 #66%
length(which(df4$duration>3))/nrow(df4)*100 #78%
length(which(df5$duration>3))/nrow(df5)*100 #77%
length(which(df2$duration>5))/nrow(df2)*100 #69%


#Median response times
median(df1$duration) #3.78
median(df2$duration) #6.25
median(df3$duration) #3.67
median(df4$duration) #4.02
median(df5$duration) #4.38

#Study 1 duration versus Study 3 duration
ks.test(df1$duration, df3$duration) #0.09

```


#####Figure B2: Study 1: Without Covariate Adjustment
#####Table B48: Study 1 Regression Results without Covariate Adjustment
#####Table B49: Study 1 Belief Regression Results without Covariate Adjustment
```{r study 1 no cov}
ld1$treatment <- if_else(ld1$alleg_treatment == "Info. Uncertain" | ld1$alleg_treatment == "Opp. Rally", 1, 0)

#Support
ld_support <- lm_robust(data = ld1, 
                   support ~ treatment) %>% tidy
ld_support

mechs_support <- lm_robust(data = ld1, 
                   support ~ alleg_treatment) %>% tidy
mechs_support

ld_support_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ treatment) %>% tidy
ld_support_text

mechs_support_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment) %>% tidy
mechs_support_text

ld_support_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ treatment) %>% tidy
ld_support_video

mechs_support_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment) %>% tidy
mechs_support_video

study_1_support <- rbind(ld_support[2,], ld_support_text[2,], ld_support_video[2,], mechs_support[2,], mechs_support_text[2,], mechs_support_video[2,], mechs_support[3,], mechs_support_text[3,], mechs_support_video[3,])
study_1_support
study_1_support$model <- rep(c("Text and Video", "Text Only", "Video Only"), 3)
study_1_support$term <- rep(c("Allegation", "Info. Uncertain", "Opp. Rally"), each = 3)


study_1_support_plot <- dwplot(study_1_support %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = model), size = 1.5)) +
#whisker_args = list(color = "blue"))  +
scale_color_discrete(name = "Media Format", labels = c("Text and Video", "Text Only", "Video Only") %>% rev(), 
                      breaks=c("Text and Video", "Text Only", "Video Only") %>% rev()) +
 scale_shape_discrete(name = "Media Format", labels = c("Text and Video", "Text Only", "Video Only"), 
                      breaks=c("Text and Video", "Text Only", "Video Only")) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Effects on Politician Support Index") +
    xlim(-.35, .35) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80")
          )
study_1_support_plot

#Table B48
m1 <- lm(data = ld1, 
                   support ~ treatment) 

m2 <- lm(data = ld1, 
                   support ~ alleg_treatment) 

m3 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ treatment) 

m4 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment) 

m5 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ treatment) 

m6 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment) 

stargazer(m1, m2, m3, m4, m5, m6,
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Study 1 Regression Results without Covariate Adjustment",
          label="tab:fig_2_unadjusted",
          font.size="scriptsize",
			    star.char = c("+","*","**","***"), 
			    star.cutoffs = c(0.1,0.05,0.01,0.001), 
			    notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
			    add.lines = list(c("Sample", "Study 1", "Study 1", "Study 1 Text", "Study 1 Text", "Study 1 Video", "Study 1 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_2_table_unadjusted.tex"))


#Belief
ld_belief <- lm_robust(data = ld1, 
                   belief ~ treatment) %>% tidy
ld_belief

mechs_belief <- lm_robust(data = ld1, 
                   belief ~ alleg_treatment) %>% tidy
mechs_belief

ld_belief_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ treatment) %>% tidy
ld_belief_text

mechs_belief_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ alleg_treatment) %>% tidy
mechs_belief_text

ld_belief_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ treatment) %>% tidy
ld_belief_video

mechs_belief_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ alleg_treatment) %>% tidy
mechs_belief_video

study_1_belief <- rbind(ld_belief[2,], ld_belief_text[2,], ld_belief_video[2,], mechs_belief[2,], mechs_belief_text[2,], mechs_belief_video[2,], mechs_belief[3,], mechs_belief_text[3,], mechs_belief_video[3,])
study_1_belief
study_1_belief$model <- rep(c("Text and Video", "Text Only", "Video Only"), 3)
study_1_belief$term <- rep(c("Allegation", "Info. Uncertain", "Opp. Rally"), each = 3)


study_1_belief_plot <- dwplot(study_1_belief %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = model), size = 1.5)) +
#whisker_args = list(color = "blue"))  +
scale_color_discrete(name = "Media Format", labels = c("Text and Video", "Text Only", "Video Only") %>% rev(), 
                      breaks=c("Text and Video", "Text Only", "Video Only") %>% rev()) +
 scale_shape_discrete(name = "Media Format", labels = c("Text and Video", "Text Only", "Video Only"), 
                      breaks=c("Text and Video", "Text Only", "Video Only")) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Effects on Belief in Scandal") +
    xlim(-.35, .35) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80")
          )
study_1_belief_plot

#Table B49
m1 <- lm(data = ld1, 
                   belief ~ treatment)

m2 <- lm(data = ld1, 
                   belief ~ alleg_treatment) 

m3 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ treatment) 

m4 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ alleg_treatment) 

m5 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ treatment) 

m6 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ alleg_treatment) 

stargazer(m1, m2, m3, m4, m5, m6,
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally"),
          dep.var.labels = "Belief Index",
          keep.stat = c("n","rsq"),
          title="Study 1 Belief Regression Results without Covariate Adjustment",
          label="tab:fig_2_unadjusted_belief",
          font.size="scriptsize",
			    star.char = c("+","*","**","***"), 
			    star.cutoffs = c(0.1,0.05,0.01,0.001), 
			    notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
			    add.lines = list(c("Sample", "Study 1", "Study 1", "Study 1 Text", "Study 1 Text", "Study 1 Video", "Study 1 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_2_table_unadjusted_belief.tex"))

#Figure B2
pdf(file.path(base_dir, "Figures/study_1_unadjusted.pdf"), width=7, height=9, onefile = F)
ggarrange(study_1_support_plot, study_1_belief_plot, ncol = 1, nrow = 2, common.legend = T, legend = "bottom")
dev.off()

```


#####Figure B3: Studies 1 and 2: Without Covariate Adjustment
#####Table B50: Studies 1 and 2 Regression Results without Covariate Adjustment
#####Table B51: Studies 1 and 2 Belief Regression Results without Covariate Adjustment
```{r study 2 no cov}
#Support
IU_support <- lm_robust(data = ld2, 
                   support_exp1 ~ alleg_treatment_1) %>% tidy
IU_support

ates <- c(mechs_support_text[2,2], IU_support[2,2]) %>% unlist %>% unname
ses <- c(mechs_support_text[2,3], IU_support[2,3]) %>% unlist %>% unname
ns <- c(nrow(ld1), nrow(ld2))
support_IU <- cbind(ates, ses, ns) %>% as_tibble()
support_IU_meta <- metagen(data = support_IU, TE = ates, seTE = ses, n.e = ns)
pooled_support_IU <- c("Pooled IU", support_IU_meta$TE.fixed, support_IU_meta$seTE.fixed, support_IU_meta$statistic.fixed, support_IU_meta$pval.fixed)


OR_support <- lm_robust(data = ld2, 
                   support_exp2 ~ alleg_treatment_2) %>% tidy
OR_support

ates <- c(mechs_support_text[3,2], OR_support[2,2]) %>% unlist %>% unname
ses <- c(mechs_support_text[3,3], OR_support[2,3]) %>% unlist %>% unname
ns <- c(nrow(ld1), nrow(ld2))
support_OR <- cbind(ates, ses, ns) %>% as_tibble()
support_OR_meta <- metagen(data = support_OR, TE = ates, seTE = ses, n.e = ns)
pooled_support_OR <- c("Pooled OR", support_OR_meta$TE.fixed, support_OR_meta$seTE.fixed, support_OR_meta$statistic.fixed, support_OR_meta$pval.fixed)


study_2_support <- rbind(mechs_support_text[2,1:5], IU_support[2,1:5], pooled_support_IU, 
                         mechs_support_text[3,1:5], OR_support[2,1:5], pooled_support_OR)
study_2_support[,-1] <- sapply(study_2_support[,-1], as.numeric)
study_2_support
study_2_support$model <- factor(rep(c("Study 1", "Study 2", "Pooled"), 2), levels = c("Study 1", "Study 2", "Pooled"))
study_2_support$term <- rep(c("Info. Uncertain", "Opp. Rally"), each = 3)


study_2_support_plot <- dwplot(study_2_support %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = model, color = model), size = 1.5)) +
#whisker_args = list(color = "blue"))  +
scale_color_manual(name = "Study", labels = c("Study 1", "Study 2", "Pooled") %>% rev(),
                   breaks=c("Study 1", "Study 2", "Pooled") %>% rev(), 
                   values = c("#7570B3", "#D95F02", "#1B9E77")) + 
 scale_shape_discrete(name = "Study", labels=c("Study 1", "Study 2", "Pooled"),
                      breaks=c("Study 1", "Study 2", "Pooled")) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Effects on Politician Support Index") +
    xlim(-.33, .33) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80")
          )
study_2_support_plot

#Table B50
m1 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment)
m2 <- lm(data = ld2, 
                   support_exp1 ~ alleg_treatment_1)
m3 <- lm(data = ld2, 
                   support_exp2 ~ alleg_treatment_2)

stargazer(m1, m2, m3,
          se = starprep(m1, m2, m3),
          omit = c("Fact Check"),
          covariate.labels=c("Info. Uncertain", "Opp. Rally", "Info. Uncertain", "Opp. Rally"),
          dep.var.labels.include = F,
			    column.labels = c("Politician Support Index"),
          column.separate = c(3),
          keep.stat = c("n","rsq"),
          title="Studies 1 and 2 Regression Results without Covariate Adjustment",
          label="tab:fig_3_unadjusted",
          font.size="scriptsize",
			    star.char = c("+","*","**","***"), 
			    star.cutoffs = c(0.1,0.05,0.01,0.001), 
			    notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
			    add.lines = list(c("Sample", "Study 1 Text", "Study 2", "Study 2")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_3_table_unadjusted.tex"))


#Belief
IU_belief <- lm_robust(data = ld2, 
                   belief_exp1 ~ alleg_treatment_1) %>% tidy
IU_belief

ates <- c(mechs_belief_text[2,2], IU_belief[2,2]) %>% unlist %>% unname
ses <- c(mechs_belief_text[2,3], IU_belief[2,3]) %>% unlist %>% unname
ns <- c(nrow(ld1), nrow(ld2))
belief_IU <- cbind(ates, ses, ns) %>% as_tibble()
belief_IU_meta <- metagen(data = belief_IU, TE = ates, seTE = ses, n.e = ns)
pooled_belief_IU <- c("Pooled IU", belief_IU_meta$TE.fixed, belief_IU_meta$seTE.fixed, belief_IU_meta$statistic.fixed, belief_IU_meta$pval.fixed)


study_2_belief <- rbind(mechs_belief_text[2,1:5], IU_belief[2,1:5], pooled_belief_IU)
study_2_belief[,-1] <- sapply(study_2_belief[,-1], as.numeric)
study_2_belief
study_2_belief$model <- factor(rep(c("Study 1", "Study 2", "Pooled"), 1), levels = c("Study 1", "Study 2", "Pooled"))
study_2_belief$term <- rep(c("Info. Uncertain"), each = 3)


study_2_belief_plot <- dwplot(study_2_belief %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = model, color = model), size = 1.5)) +
#whisker_args = list(color = "blue"))  +
scale_color_manual(name = "Study", labels = c("Study 1", "Study 2", "Pooled") %>% rev(),
                   breaks=c("Study 1", "Study 2", "Pooled") %>% rev(), 
                   values = c("#7570B3", "#D95F02", "#1B9E77")) + 
 scale_shape_discrete(name = "Study", labels=c("Study 1", "Study 2", "Pooled"),
                      breaks=c("Study 1", "Study 2", "Pooled")) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Effects on Belief in Scandal") +
    xlim(-.33, .33) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80")
          )
study_2_belief_plot

#Table B51
m1 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ alleg_treatment) 
m2 <- lm(data = ld2, 
                   belief_exp1 ~ alleg_treatment_1)

stargazer(m1, m2,
          se = starprep(m1, m2),
          omit = c("Fact Check", "Opp. Rally"),
          covariate.labels=c("Info. Uncertain", "Info. Uncertain"),
          dep.var.labels.include = F,
			    column.labels = c("Belief Index"),
			    column.separate = c(2),
          keep.stat = c("n","rsq"),
          title="Studies 1 and 2 Belief Regression Results without Covariate Adjustment",
          label="tab:fig_3_unadjusted_belief",
          font.size="scriptsize",
			    star.char = c("+","*","**","***"), 
			    star.cutoffs = c(0.1,0.05,0.01,0.001), 
			    notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
			    add.lines = list(c("Sample", "Study 1 Text", "Study 2")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_3_table_unadjusted_belief.tex"))

#Figure B3
pdf(file.path(base_dir, "Figures/study_2_unadjusted.pdf"), width=7, height=9, onefile = F)
ggarrange(study_2_support_plot, study_2_belief_plot, ncol = 1, nrow = 2, common.legend = T, legend = "bottom")
dev.off()

```


#####Figure B4: Study 1: With Politician Fixed Effects
#####Table B52: Study 1 Regression Results with Politician Fixed Effects
#####Table B53: Study 1 Belief Regression Results with Politician Fixed Effects
```{r study 1 pol fes}
ld1$treatment <- if_else(ld1$alleg_treatment == "Info. Uncertain" | ld1$alleg_treatment == "Opp. Rally", 1, 0)

#Support
ld_support <- lm_robust(data = ld1, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
ld_support

mechs_support <- lm_robust(data = ld1, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
mechs_support

ld_support_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
ld_support_text

mechs_support_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
mechs_support_text

ld_support_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
ld_support_video

mechs_support_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
mechs_support_video

study_1_support <- rbind(ld_support[2,], ld_support_text[2,], ld_support_video[2,], mechs_support[2,], mechs_support_text[2,], mechs_support_video[2,], mechs_support[3,], mechs_support_text[3,], mechs_support_video[3,])
study_1_support
study_1_support$model <- rep(c("Text and Video", "Text Only", "Video Only"), 3)
study_1_support$term <- rep(c("Allegation", "Info. Uncertain", "Opp. Rally"), each = 3)


study_1_support_plot <- dwplot(study_1_support %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = model), size = 1.5)) +
#whisker_args = list(color = "blue"))  +
scale_color_discrete(name = "Media Format", labels = c("Text and Video", "Text Only", "Video Only") %>% rev(), 
                      breaks=c("Text and Video", "Text Only", "Video Only") %>% rev()) +
 scale_shape_discrete(name = "Media Format", labels = c("Text and Video", "Text Only", "Video Only"), 
                      breaks=c("Text and Video", "Text Only", "Video Only")) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Effects on Politician Support Index") +
    xlim(-.35, .35) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80")
          )
study_1_support_plot


#Table B52
m1 <- lm(data = ld1, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)
m2 <- lm(data = ld1, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) 
m3 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) 
m4 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)
m5 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)
m6 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)

stargazer(m1, m2, m3, m4, m5, m6,
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "John Murtha", "Tim James", "Todd Akin",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Study 1 Regression Results with Politician Fixed Effects",
          label="tab:fig_2_politician_fes",
          font.size="tiny",
			    star.char = c("+","*","**","***"), 
			    star.cutoffs = c(0.1,0.05,0.01,0.001), 
			    notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
			    add.lines = list(c("Sample", "Study 1", "Study 1", "Study 1 Text", "Study 1 Text", "Study 1 Video", "Study 1 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_2_table_politician_fes.tex"))


#Belief
ld_belief <- lm_robust(data = ld1, 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
ld_belief

mechs_belief <- lm_robust(data = ld1, 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
mechs_belief

ld_belief_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
ld_belief_text

mechs_belief_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
mechs_belief_text

ld_belief_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
ld_belief_video

mechs_belief_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) %>% tidy
mechs_belief_video

study_1_belief <- rbind(ld_belief[2,], ld_belief_text[2,], ld_belief_video[2,], mechs_belief[2,], mechs_belief_text[2,], mechs_belief_video[2,], mechs_belief[3,], mechs_belief_text[3,], mechs_belief_video[3,])
study_1_belief
study_1_belief$model <- rep(c("Text and Video", "Text Only", "Video Only"), 3)
study_1_belief$term <- rep(c("Allegation", "Info. Uncertain", "Opp. Rally"), each = 3)


study_1_belief_plot <- dwplot(study_1_belief %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = model), size = 1.5)) +
#whisker_args = list(color = "blue"))  +
scale_color_discrete(name = "Media Format", labels = c("Text and Video", "Text Only", "Video Only") %>% rev(), 
                      breaks=c("Text and Video", "Text Only", "Video Only") %>% rev()) +
 scale_shape_discrete(name = "Media Format", labels = c("Text and Video", "Text Only", "Video Only"), 
                      breaks=c("Text and Video", "Text Only", "Video Only")) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Effects on Belief in Scandal") +
    xlim(-.35, .35) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80")
          )
study_1_belief_plot

#Table B53
m1 <- lm(data = ld1, 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)
m2 <- lm(data = ld1, 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) 
m3 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician) 
m4 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)
m5 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)
m6 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)

stargazer(m1, m2, m3, m4, m5, m6,
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "John Murtha", "Tim James", "Todd Akin",
                             "Constant"),
          dep.var.labels = "Belief Index",
          keep.stat = c("n","rsq"),
          title="Study 1 Belief Regression Results with Politician Fixed Effects",
          label="tab:fig_2_politician_fes_belief",
          font.size="tiny",
			    star.char = c("+","*","**","***"), 
			    star.cutoffs = c(0.1,0.05,0.01,0.001), 
			    notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
			    add.lines = list(c("Sample", "Study 1", "Study 1", "Study 1 Text", "Study 1 Text", "Study 1 Video", "Study 1 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_2_table_politician_fes_belief.tex"))

#Figure B4
pdf(file.path(base_dir, "Figures/study_1_politician_fes.pdf"), width=7, height=9, onefile = F)
ggarrange(study_1_support_plot, study_1_belief_plot, ncol = 1, nrow = 2, common.legend = T, legend = "bottom")
dev.off()

```


#####Figure B5: Studies 1 and 2: With Politician Fixed Effects
#####Table B54: Studies 1 and 2 Regression Results with Politician Fixed Effects
#####Table B55: Studies 1 and 2 Belief Regression Results with Politician Fixed Effects
```{r study 2 pol fes}
#Support
IU_support <- lm_robust(data = ld2, 
                   support_exp1 ~ alleg_treatment_1 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician_1) %>% tidy
IU_support

ates <- c(mechs_support_text[2,2], IU_support[2,2]) %>% unlist %>% unname
ses <- c(mechs_support_text[2,3], IU_support[2,3]) %>% unlist %>% unname
ns <- c(nrow(ld1), nrow(ld2))
support_IU <- cbind(ates, ses, ns) %>% as_tibble()
support_IU_meta <- metagen(data = support_IU, TE = ates, seTE = ses, n.e = ns)
pooled_support_IU <- c("Pooled IU", support_IU_meta$TE.fixed, support_IU_meta$seTE.fixed, support_IU_meta$statistic.fixed, support_IU_meta$pval.fixed)


OR_support <- lm_robust(data = ld2, 
                   support_exp2 ~ alleg_treatment_2 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician_2) %>% tidy
OR_support

ates <- c(mechs_support_text[3,2], OR_support[2,2]) %>% unlist %>% unname
ses <- c(mechs_support_text[3,3], OR_support[2,3]) %>% unlist %>% unname
ns <- c(nrow(ld1), nrow(ld2))
support_OR <- cbind(ates, ses, ns) %>% as_tibble()
support_OR_meta <- metagen(data = support_OR, TE = ates, seTE = ses, n.e = ns)
pooled_support_OR <- c("Pooled OR", support_OR_meta$TE.fixed, support_OR_meta$seTE.fixed, support_OR_meta$statistic.fixed, support_OR_meta$pval.fixed)


study_2_support <- rbind(mechs_support_text[2,1:5], IU_support[2,1:5], pooled_support_IU, 
                         mechs_support_text[3,1:5], OR_support[2,1:5], pooled_support_OR)
study_2_support[,-1] <- sapply(study_2_support[,-1], as.numeric)
study_2_support
study_2_support$model <- factor(rep(c("Study 1", "Study 2", "Pooled"), 2), levels = c("Study 1", "Study 2", "Pooled"))
study_2_support$term <- rep(c("Info. Uncertain", "Opp. Rally"), each = 3)


study_2_support_plot <- dwplot(study_2_support %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = model, color = model), size = 1.5)) +
#whisker_args = list(color = "blue"))  +
scale_color_manual(name = "Study", labels = c("Study 1", "Study 2", "Pooled") %>% rev(),
                   breaks=c("Study 1", "Study 2", "Pooled") %>% rev(), 
                   values = c("#7570B3", "#D95F02", "#1B9E77")) + 
 scale_shape_discrete(name = "Study", labels=c("Study 1", "Study 2", "Pooled"),
                      breaks=c("Study 1", "Study 2", "Pooled")) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Effects on Politician Support Index") +
    xlim(-.3, .3) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80")
          )
study_2_support_plot

#Table B54
m1 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)
m2 <- lm(data = ld2, 
                   support_exp1 ~ alleg_treatment_1 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician_1)
m3 <- lm(data = ld2, 
                   support_exp2 ~ alleg_treatment_2 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician_2)

stargazer(m1, m2, m3,
          se = starprep(m1, m2, m3),
          omit = c("Fact Check"),
          covariate.labels=c("Info. Uncertain", "Opp. Rally", "Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "John Murtha", "Tim James", "Todd Akin",
                             "John Murtha", "Tim James", "Todd Akin",
                             "John Murtha", "Tim James", "Todd Akin",
                             "Constant"),
          dep.var.labels.include = F,
			    column.labels = c("Politician Support Index"),
          column.separate = c(3),
          keep.stat = c("n","rsq"),
          title="Studies 1 and 2 Regression Results with Politician Fixed Effects",
          label="tab:fig_3_politician_fes",
          font.size="tiny",
			    star.char = c("+","*","**","***"), 
			    star.cutoffs = c(0.1,0.05,0.01,0.001), 
			    notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
			    add.lines = list(c("Sample", "Study 1 Text", "Study 2", "Study 2")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_3_table_politician_fes.tex"))


#Belief
IU_belief <- lm_robust(data = ld2, 
                   belief_exp1 ~ alleg_treatment_1 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician_1) %>% tidy
IU_belief

ates <- c(mechs_belief_text[2,2], IU_belief[2,2]) %>% unlist %>% unname
ses <- c(mechs_belief_text[2,3], IU_belief[2,3]) %>% unlist %>% unname
ns <- c(nrow(ld1), nrow(ld2))
belief_IU <- cbind(ates, ses, ns) %>% as_tibble()
belief_IU_meta <- metagen(data = belief_IU, TE = ates, seTE = ses, n.e = ns)
pooled_belief_IU <- c("Pooled IU", belief_IU_meta$TE.fixed, belief_IU_meta$seTE.fixed, belief_IU_meta$statistic.fixed, belief_IU_meta$pval.fixed)


study_2_belief <- rbind(mechs_belief_text[2,1:5], IU_belief[2,1:5], pooled_belief_IU)
study_2_belief[,-1] <- sapply(study_2_belief[,-1], as.numeric)
study_2_belief
study_2_belief$model <- factor(rep(c("Study 1", "Study 2", "Pooled"), 1), levels = c("Study 1", "Study 2", "Pooled"))
study_2_belief$term <- rep(c("Info. Uncertain"), each = 3)


study_2_belief_plot <- dwplot(study_2_belief %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = model, color = model), size = 1.5)) +
#whisker_args = list(color = "blue"))  +
scale_color_manual(name = "Study", labels = c("Study 1", "Study 2", "Pooled") %>% rev(),
                   breaks=c("Study 1", "Study 2", "Pooled") %>% rev(), 
                   values = c("#7570B3", "#D95F02", "#1B9E77")) + 
 scale_shape_discrete(name = "Study", labels=c("Study 1", "Study 2", "Pooled"),
                      breaks=c("Study 1", "Study 2", "Pooled")) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Effects on Belief in Scandal") +
    xlim(-.3, .3) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80")
          )
study_2_belief_plot

#Table B55
m1 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician)
m2 <- lm(data = ld2, 
                   belief_exp1 ~ alleg_treatment_1 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy + politician_1)

stargazer(m1, m2,
          se = starprep(m1, m2),
          omit = c("Fact Check", "Opp. Rally"),
          covariate.labels=c("Info. Uncertain", "Info. Uncertain",
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "John Murtha", "Tim James", "Todd Akin",
                             "John Murtha", "Tim James", "Todd Akin",
                             "Constant"),
          dep.var.labels.include = F,
			    column.labels = c("Belief Index"),
          column.separate = c(2),
          keep.stat = c("n","rsq"),
          title="Studies 1 and 2 Belief Regression Results with Politician Fixed Effects",
          label="tab:fig_3_politician_fes_belief",
          font.size="tiny",
			    star.char = c("+","*","**","***"), 
			    star.cutoffs = c(0.1,0.05,0.01,0.001), 
			    notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
			    add.lines = list(c("Sample", "Study 1 Text", "Study 2")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_3_table_politician_fes_belief.tex"))

#Figure B5
pdf(file.path(base_dir, "Figures/study_2_politician_fes.pdf"), width=7, height=9, onefile = F)
ggarrange(study_2_support_plot, study_2_belief_plot, ncol = 1, nrow = 2, common.legend = T, legend = "bottom")
dev.off()

```


#####Figure B6: Treatment Effects by Politician
#####Table B56: Treatment Effects by Politician
```{r pol tes}
####Study 1 Text
ld1$politician <- factor(ld1$politician)

jackson <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment*relevel(politician, ref = "Jesse Jackson") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
murtha <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment*relevel(politician, ref = "John Murtha") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
james <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment*relevel(politician, ref = "Tim James") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
akin <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment*relevel(politician, ref = "Todd Akin") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy

#Are differences significant?
jackson$p.value[32:37] #No
murtha$p.value[32:37] #No
james$p.value[32:37] #No
akin$p.value[32:37] #No

politician_het_effects <- rbind(jackson[2:3,], murtha[2:3,], james[2:3,], akin[2:3,])
politician_het_effects$politician <- rep(c("Jesse Jackson", "John Murtha", "Tim James", "Todd Akin"), each=2)
treatment_names <- c(
  `alleg_treatmentInfo. Uncertain` = "Info. Uncertain",
  `alleg_treatmentOpp. Rally` = "Opp. Rally"
)

study1_text_interplot <- politician_het_effects %>% 
  mutate_at(vars(estimate, conf.low, conf.high), as.numeric) %>% 
  ggplot(aes(x = politician, y = estimate, ymin = conf.low, ymax = conf.high)) +
  geom_linerange() +
  geom_point(shape=1)+
  geom_hline(yintercept = 0, linetype=2, alpha=.5) +
  facet_wrap(~term, labeller=as_labeller(treatment_names)) +
  theme_minimal() +
  theme(axis.line.x = element_line(),
        panel.grid.minor.x = element_blank(),
        panel.grid.major.x = element_blank(),
        strip.background = element_rect(fill = "#eeeeee", color = "white")) +
  xlab("Politician") + ylab("Standardized Treatment Effect on Support") +
  ggtitle("Study 1 (Text)")
study1_text_interplot


####Study 1 Video
jackson <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment*relevel(politician, ref = "Jesse Jackson") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
murtha <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment*relevel(politician, ref = "John Murtha") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
james <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment*relevel(politician, ref = "Tim James") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
akin <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment*relevel(politician, ref = "Todd Akin") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy

#Are differences significant?
jackson$p.value[32:37] #Video + IU for Akin higher than Jackson
murtha$p.value[32:37] #No
james$p.value[32:37] #No
akin$p.value[32:37] #Video + IU for Akin higher than Jackson

politician_het_effects <- rbind(jackson[2:3,], murtha[2:3,], james[2:3,], akin[2:3,])
politician_het_effects$politician <- rep(c("Jesse Jackson", "John Murtha", "Tim James", "Todd Akin"), each=2)
treatment_names <- c(
  `alleg_treatmentInfo. Uncertain` = "Info. Uncertain",
  `alleg_treatmentOpp. Rally` = "Opp. Rally"
)

study1_video_interplot <- politician_het_effects %>% 
  mutate_at(vars(estimate, conf.low, conf.high), as.numeric) %>% 
  ggplot(aes(x = politician, y = estimate, ymin = conf.low, ymax = conf.high)) +
  geom_linerange() +
  geom_point(shape=1)+
  geom_hline(yintercept = 0, linetype=2, alpha=.5) +
  facet_wrap(~term, labeller=as_labeller(treatment_names)) +
  theme_minimal() +
  theme(axis.line.x = element_line(),
        panel.grid.minor.x = element_blank(),
        panel.grid.major.x = element_blank(),
        strip.background = element_rect(fill = "#eeeeee", color = "white")) +
  xlab("Politician") + ylab("Standardized Treatment Effect on Support") +
  ggtitle("Study 1 (Video)")
study1_video_interplot


####Study 2
ld2$politician_1 <- factor(ld2$politician_1)
ld2$politician_2 <- factor(ld2$politician_2)

jackson_iu <- lm_robust(data = ld2, 
                   support_exp1 ~ alleg_treatment_1*relevel(politician_1, ref = "Jesse Jackson") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
murtha_iu <- lm_robust(data = ld2, 
                   support_exp1 ~ alleg_treatment_1*relevel(politician_1, ref = "John Murtha") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
james_iu <- lm_robust(data = ld2, 
                   support_exp1 ~ alleg_treatment_1*relevel(politician_1, ref = "Tim James") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
akin_iu <- lm_robust(data = ld2, 
                   support_exp1 ~ alleg_treatment_1*relevel(politician_1, ref = "Todd Akin") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy

#Are differences significant?
jackson_iu$p.value[c(32,34,36)] ##No
murtha_iu$p.value[c(32,34,36)] #No
james_iu$p.value[c(32,34,36)] #No
akin_iu$p.value[c(32,34,36)] #No

jackson_or <- lm_robust(data = ld2, 
                   support_exp2 ~ alleg_treatment_2*relevel(politician_2, ref = "Jesse Jackson") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
murtha_or <- lm_robust(data = ld2, 
                   support_exp2 ~ alleg_treatment_2*relevel(politician_2, ref = "John Murtha") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
james_or <- lm_robust(data = ld2, 
                   support_exp2 ~ alleg_treatment_2*relevel(politician_2, ref = "Tim James") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy
akin_or <- lm_robust(data = ld2, 
                   support_exp2 ~ alleg_treatment_2*relevel(politician_2, ref = "Todd Akin") +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy) %>% tidy

#Are differences significant?
jackson_or$p.value[31:33] #Text OR higher for Jackson than James
murtha_or$p.value[31:33] #Text OR higher for Akin than Murtha
james_or$p.value[31:33] #Text OR higher for Jackson and Akin than James
akin_or$p.value[31:33] #Text OR higher for Akin than James and Murtha

politician_het_effects <- rbind(jackson_iu[2,], jackson_or[2,],
                                murtha_iu[2,], murtha_or[2,],
                                james_iu[2,], james_or[2,],
                                akin_iu[2,], akin_or[2,])
politician_het_effects$politician <- rep(c("Jesse Jackson", "John Murtha", "Tim James", "Todd Akin"), each=2)
treatment_names <- c(
  `alleg_treatment_1Info. Uncertain` = "Info. Uncertain",
  `alleg_treatment_2Opp. Rally` = "Opp. Rally"
)

study2_interplot <- politician_het_effects %>% 
  mutate_at(vars(estimate, conf.low, conf.high), as.numeric) %>% 
  ggplot(aes(x = politician, y = estimate, ymin = conf.low, ymax = conf.high)) +
  geom_linerange() +
  geom_point(shape=1)+
  geom_hline(yintercept = 0, linetype=2, alpha=.5) +
  facet_wrap(~term, labeller=as_labeller(treatment_names)) +
  theme_minimal() +
  theme(axis.line.x = element_line(),
        panel.grid.minor.x = element_blank(),
        panel.grid.major.x = element_blank(),
        strip.background = element_rect(fill = "#eeeeee", color = "white")) +
  xlab("Politician") + ylab("Standardized Treatment Effect on Support") +
  ggtitle("Study 2 (Text)")
study2_interplot


####Figure B6
pdf(file.path(base_dir, "Figures/treatment_effects_by_politician.pdf"), width=8, height=10)
plot_grid(study1_text_interplot, study1_video_interplot, study2_interplot,
          ncol=1, nrow=3)
dev.off()

#Table B56
study1_text <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment*politician +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy)
study1_video <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment*politician +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy)
study2_iu <- lm(data = ld2 %>% mutate(support = support_exp1,
                                      alleg_treatment = alleg_treatment_1,
                                      politician = politician_1), 
                   support ~ alleg_treatment*politician +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy)
study2_or <- lm(data = ld2 %>% mutate(support = support_exp2,
                                      alleg_treatment = alleg_treatment_2,
                                      politician = politician_2),  
                   support ~ alleg_treatment*politician +
                     party + gender + race + age + education + income + region + 
                     media_literacy + digital_literacy)

stargazer(study1_text, study1_video, study2_iu, study2_or,
          se = starprep(study1_text, study1_video, study2_iu, study2_or),
          omit = c("Fact Check"),
          covariate.labels=c("Info. Uncertain", "Opp. Rally",
                             "John Murtha", "Tim James", "Todd Akin",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Info. Uncertain x John Murtha",
                             "Opp. Rally x John Murtha",
                             "Info. Uncertain x Tim James",
                             "Opp. Rally x Tim James",
                             "Info. Uncertain x Todd Akin",
                             "Opp. Rally x Todd Akin",
                             "Constant"),
          dep.var.labels.include = F,
          column.labels = c("Politician Support Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Treatment Effects by Politician",
          label="tab:politician_het_effects",
          font.size="tiny",
          star.char = c("+","*","**","***"),
          star.cutoffs = c(0.1,0.05,0.01,0.001),
          notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
          add.lines = list(c("Sample", "Study 1 Text", "Study 1 Video", "Study 2", "Study 2")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/politician_het_effects_table.tex"))

```


#####Table B57: Study 1 Regression Results by Politician
```{r pol effects}
#Jesse Jackson
ld1$treatment <- if_else(ld1$alleg_treatment == "Info. Uncertain" | ld1$alleg_treatment == "Opp. Rally", 1, 0)
jackson <- ld1 %>% filter(politician=="Jesse Jackson")
ld <- lm(data = jackson, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
mechs <- lm(data = jackson, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
ld_text <- lm(data = jackson %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
mechs_text <- lm(data = jackson %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
ld_video <- lm(data = jackson %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
mechs_video <- lm(data = jackson %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(ld, mechs, ld_text, mechs_text, ld_video, mechs_video,
          se = starprep(ld, mechs, ld_text, mechs_text, ld_video,
                        mechs_video),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally", 
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican", 
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Figure 2 Regression Results",
          label="tab:fig_2",
          notes="Notes: With robust SEs",
          style="APSR",
          header=F,
          type="latex")

#Jesse Jackson: much stronger support from Strong Democrats, much weaker support from Strong Republicans, much stronger support from Black respondents, much stronger support from those with graduate degrees, and lower support with higher media literacy


#John Murtha
murtha <- ld1 %>% filter(politician=="John Murtha")
ld <- lm(data = murtha, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
mechs <- lm(data = murtha, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
ld_text <- lm(data = murtha %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
mechs_text <- lm(data = murtha %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
ld_video <- lm(data = murtha %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
mechs_video <- lm(data = murtha %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(ld, mechs, ld_text, mechs_text, ld_video, mechs_video,
          se = starprep(ld, mechs, ld_text, mechs_text, ld_video,
                        mechs_video),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally", 
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican", 
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Figure 2 Regression Results",
          label="tab:fig_2",
          notes="Notes: With robust SEs",
          style="APSR",
          header=F,
          type="latex")

#John Murtha: much stronger support from Strong Democrats and Democrats, stronger support from those with graduate degrees, and lower support with higher media literacy


#Tim James
james <- ld1 %>% filter(politician=="Tim James")
ld <- lm(data = james, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
mechs <- lm(data = james, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
ld_text <- lm(data = james %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
mechs_text <- lm(data = james %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
ld_video <- lm(data = james %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
mechs_video <- lm(data = james %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(ld, mechs, ld_text, mechs_text, ld_video, mechs_video,
          se = starprep(ld, mechs, ld_text, mechs_text, ld_video,
                        mechs_video),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally", 
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican", 
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Figure 2 Regression Results",
          label="tab:fig_2",
          notes="Notes: With robust SEs",
          style="APSR",
          header=F,
          type="latex")

#Tim James: lower Strong Dem and Dem, higher lean-strong Repub, higher other race, higher all gens compared to gen z, lower support with media literacy, higher support with digital literacy


#Todd Akin
akin <- ld1 %>% filter(politician=="Todd Akin")
ld <- lm(data = akin, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
mechs <- lm(data = akin, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
ld_text <- lm(data = akin %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
mechs_text <- lm(data = akin %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
ld_video <- lm(data = akin %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
mechs_video <- lm(data = akin %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(ld, mechs, ld_text, mechs_text, ld_video, mechs_video,
          se = starprep(ld, mechs, ld_text, mechs_text, ld_video,
                        mechs_video),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally", 
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican", 
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Figure 2 Regression Results",
          label="tab:fig_2",
          notes="Notes: With robust SEs",
          style="APSR",
          header=F,
          type="latex")

#Todd Akin: higher lean-strong Repub, much lower female, higher millennial, higher with grad degree, lower support with media literacy, higher support with digital literacy


#Table B57
all_reg <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
jackson_reg <- lm(data = jackson %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
murtha_reg <- lm(data = murtha %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
james_reg <- lm(data = james %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
akin_reg <- lm(data = akin %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(all_reg, jackson_reg, murtha_reg, james_reg, akin_reg,
          se = starprep(all_reg, jackson_reg, murtha_reg, james_reg, akin_reg),
          covariate.labels=c("Info. Uncertain", "Opp. Rally", 
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican", 
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          column.labels = c("All", "Jackson (D)", "Murtha (D)", "James (R)", "Akin (R)"),
          keep.stat = c("n","rsq"),
          title="Study 1 Regression Results by Politician",
          label="tab:fig_2_politician",
          font.size="scriptsize",
          star.char = c("+","*","**","***"),
          star.cutoffs = c(0.1,0.05,0.01,0.001),
          notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
          add.lines = list(c("Sample", "Study 1 Text", "Study 1 Text", "Study 1 Text", "Study 1 Text", "Study 1 Text")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_2_table_politician.tex"))

```


#####Figure B7: Study 1: Support Outcome Disaggregated
#####Table B58: Study 1 Support Outcome Disaggregated
```{r support disaggregated}
coef_labels <- c("(Intercept)", 
                 "Info. Uncertain", "Opp. Rallying", 
                 "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican", "Strong Republican", 
                 "Female", 
                 "Black", "Hispanic", "Asian", "Other",
                 "Millenials","Gen X","Boomers","Silent",
                 "Some college", "Bachelor's degree", "Graduate degree", 
                 "Low income", "High income", 
                 "Midwest", "South", "West", 
                 "Media Literacy", "Digital Literacy")

support_1 <- lm_robust(data = ld1,
                   support_1 ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
support_1$term <- coef_labels

support_2 <- lm_robust(data = ld1,
                   support_2 ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
support_2$term <- coef_labels


support_3 <- lm_robust(data = ld1,
                   support_3 ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
support_3$term <- coef_labels


support_4 <- lm_robust(data = ld1,
                   support_4 ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
support_4$term <- coef_labels

#Figure B7
pdf(file.path(base_dir, "Figures/support_coefplot.pdf"), width=9, height=7)

support_1_plot <- dwplot(support_1[2:3,],
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(size = 3, color = "blue"),
whisker_args = list(color = "blue"))  +
    xlab("\nStandardized Treatment Effect") + ylab("") + ggtitle("Support for Politician") +
    xlim(-.5, .5) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "none",
          legend.background = element_rect(colour="grey80")
          )

support_2_plot <- dwplot(support_2[2:3,],
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(size = 3, color = "blue"),
whisker_args = list(color = "blue"))  +
    xlab("\nStandardized Treatment Effect") + ylab("") + ggtitle("Defense of Politician") +
    xlim(-.5, .5) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "none",
          legend.background = element_rect(colour="grey80")
          )

support_3_plot <- dwplot(support_3[2:3,],
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(size = 3, color = "blue"),
whisker_args = list(color = "blue"))  +
    xlab("\nStandardized Treatment Effect") + ylab("") + ggtitle("Vote for Politician") +
    xlim(-.5, .5) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "none",
          legend.background = element_rect(colour="grey80")
          )

support_4_plot <- dwplot(support_4[2:3,],
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(size = 3, color = "blue"),
whisker_args = list(color = "blue"))  +
    xlab("\nStandardized Treatment Effect") + ylab("") + ggtitle("Donation to Politician") +
    xlim(-.5, .5) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "none",
          legend.background = element_rect(colour="grey80")
          )

ggarrange(support_1_plot, support_2_plot, support_3_plot, support_4_plot, ncol = 2, nrow = 2)
dev.off()

#Table B58
support_1 <- lm(data = ld1,
                   support_1 ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

support_2 <- lm(data = ld1,
                   support_2 ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 

support_3 <- lm(data = ld1,
                   support_3 ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 

support_4 <- lm(data = ld1,
                   support_4 ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 

stargazer(support_1, support_2, support_3, support_4,
          se = starprep(support_1, support_2, support_3, support_4),
          covariate.labels=c("Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = c("Support", "Defend", "Vote", "Donate"),
          keep.stat = c("n","rsq"),
          title="Study 1 Support Outcome Disaggregated",
          label="tab:support_disaggregated",
          font.size="scriptsize",
          star.char = c("+","*","**","***"),
          star.cutoffs = c(0.1,0.05,0.01,0.001),
          notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
          add.lines = list(c("Sample", "Study 1", "Study 1", "Study 1", "Study 1")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/support_disaggregation_table.tex"))

```


#####Figure A9: Liar's Dividend Results for Study 1 and Study 4 with Pooling
#####Table B18: Figure 2 Regression Results - Study 1, with Pooling
#####Table B19: Figure 2 Regression Results - Study 1, Attentive, with Pooling
#####Table B20: Figure 2 Regression Results - Study 4, with Pooling
#####Table B21: Figure 2 Regression Results - Study 4, Attentive, with Pooling
```{r}
#Figure A9a
ld_support <- lm_robust(data = ld1, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
ld_support

mechs_support <- lm_robust(data = ld1, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
mechs_support

ld_support_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
ld_support_text

mechs_support_text <- lm_robust(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
mechs_support_text

ld_support_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
ld_support_video

mechs_support_video <- lm_robust(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
mechs_support_video

ld_support_att <- lm_robust(data = ld1 %>% filter(attentiveness==2), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

mechs_support_att <- lm_robust(data = ld1 %>% filter(attentiveness==2), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

ld_support_text_att <- lm_robust(data = ld1 %>% filter(attentiveness==2) %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

mechs_support_text_att <- lm_robust(data = ld1 %>% filter(attentiveness==2) %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

ld_support_video_att <- lm_robust(data = ld1 %>% filter(attentiveness==2) %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

mechs_support_video_att <- lm_robust(data = ld1 %>% filter(attentiveness==2) %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

study_1_support <- rbind(ld_support[2,], ld_support_text[2,], ld_support_video[2,], mechs_support[2,], mechs_support_text[2,], mechs_support_video[2,], mechs_support[3,], mechs_support_text[3,], mechs_support_video[3,],
                         ld_support_att[2,], ld_support_text_att[2,], ld_support_video_att[2,], mechs_support_att[2,], mechs_support_text_att[2,], mechs_support_video_att[2,], mechs_support_att[3,], mechs_support_text_att[3,], mechs_support_video_att[3,])
study_1_support
study_1_support$model <- c(rep(c("Text and Video", "Text Only", "Video Only"), 3),
                           rep(c("Text and Video Attentive", "Text Only Attentive", "Video Only Attentive"), 3))
study_1_support$media <- rep(rep(c("Text and Video", "Text Only", "Video Only"), 3), 2)
study_1_support$term <- rep(rep(c("Allegation", "Info. Uncertain", "Opp. Rally"), each = 3), 2)
study_1_support$attentive <- rep(c("Full", "Attentive Only"), each = 9)


study_1_support_plot <- dwplot(study_1_support %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = media, color = media), size = 1.5),
whisker_args = list(aes(linetype = attentive, color = media)))  +
scale_color_manual(name = "Media Format", 
                   labels = c("Text and Video", "Text Only", "Video Only") %>% rev(),
                   breaks=c("Text and Video", "Text Only", "Video Only") %>% rev(),
                   values = c("#F8766D", "#00BA38", "#619CFF")) +
 scale_shape_manual(name = "Media Format", 
                    labels = c("Text and Video", "Text Only", "Video Only"), 
                    breaks=c("Text and Video", "Text Only", "Video Only"),
                    values = c(15, 17, 16)) +
  scale_linetype_manual(name = "Sample", 
                        labels = c("Full", "Attentive Only"),
                        breaks = c("Full", "Attentive Only"), 
                        values = c(1,2)) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Effects on Politician Support Index") +
    xlim(-.25, .5) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80"),
          axis.title.x = element_text(size = 11), axis.text.y = element_text(size = 9),
          legend.text = element_text(size = 10), legend.title = element_text(size = 10)
          )
study_1_support_plot

pdf(file.path(base_dir, "Figures/study_1_support_pooling.pdf"), width=7.5, height=4.5)
study_1_support_plot
dev.off()

#Figure A9b
ld_support <- lm_robust(data = ld4, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
ld_support

mechs_support <- lm_robust(data = ld4, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
mechs_support

ld_support_text <- lm_robust(data = ld4 %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
ld_support_text

mechs_support_text <- lm_robust(data = ld4 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
mechs_support_text

ld_support_video <- lm_robust(data = ld4 %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
ld_support_video

mechs_support_video <- lm_robust(data = ld4 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy
mechs_support_video

ld_support_att <- lm_robust(data = ld4 %>% filter(attentiveness==2), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

mechs_support_att <- lm_robust(data = ld4 %>% filter(attentiveness==2), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

ld_support_text_att <- lm_robust(data = ld4 %>% filter(attentiveness==2) %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

mechs_support_text_att <- lm_robust(data = ld4 %>% filter(attentiveness==2) %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

ld_support_video_att <- lm_robust(data = ld4 %>% filter(attentiveness==2) %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

mechs_support_video_att <- lm_robust(data = ld4 %>% filter(attentiveness==2) %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) %>% tidy

study_4_support <- rbind(ld_support[2,], ld_support_text[2,], ld_support_video[2,], mechs_support[2,], mechs_support_text[2,], mechs_support_video[2,], mechs_support[3,], mechs_support_text[3,], mechs_support_video[3,],
                         ld_support_att[2,], ld_support_text_att[2,], ld_support_video_att[2,], mechs_support_att[2,], mechs_support_text_att[2,], mechs_support_video_att[2,], mechs_support_att[3,], mechs_support_text_att[3,], mechs_support_video_att[3,])
study_4_support
study_4_support$model <- c(rep(c("Text and Video", "Text Only", "Video Only"), 3),
                           rep(c("Text and Video Attentive", "Text Only Attentive", "Video Only Attentive"), 3))
study_4_support$media <- rep(rep(c("Text and Video", "Text Only", "Video Only"), 3), 2)
study_4_support$term <- rep(rep(c("Allegation", "Info. Uncertain", "Opp. Rally"), each = 3), 2)
study_4_support$attentive <- rep(c("Full", "Attentive Only"), each = 9)


study_4_support_plot <- dwplot(study_4_support %>% arrange(model),
vline = geom_vline(xintercept = 0, colour = "grey60", linetype = 2),
dot_args = list(aes(shape = media, color = media), size = 1.5),
whisker_args = list(aes(linetype = attentive, color = media)))  +
scale_color_manual(name = "Media Format", 
                   labels = c("Text and Video", "Text Only", "Video Only") %>% rev(),
                   breaks=c("Text and Video", "Text Only", "Video Only") %>% rev(),
                   values = c("#F8766D", "#00BA38", "#619CFF")) +
 scale_shape_manual(name = "Media Format", 
                    labels = c("Text and Video", "Text Only", "Video Only"), 
                    breaks=c("Text and Video", "Text Only", "Video Only"),
                    values = c(15, 17, 16)) +
  scale_linetype_manual(name = "Sample", 
                        labels = c("Full", "Attentive Only"),
                        breaks = c("Full", "Attentive Only"), 
                        values = c(1,2)) +
    xlab("\nTreatment Effect (Standardized)") + ylab("") + ggtitle("Replication: Effects on Politician Support Index") +
    xlim(-.25, .5) +
    theme_bw() + 
    theme(plot.title = element_text(face="bold"),
          legend.position = "right",
          legend.background = element_rect(colour="grey80"),
          axis.title.x = element_text(size = 11), axis.text.y = element_text(size = 9),
          legend.text = element_text(size = 10), legend.title = element_text(size = 10)
          )
study_4_support_plot

pdf(file.path(base_dir, "Figures/study_4_support_pooling.pdf"), width=7.5, height=4.5)
study_4_support_plot
dev.off()


#Table B18
m1 <- lm(data = ld1, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m2 <- lm(data = ld1, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
m3 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
m4 <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m5 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m6 <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(m1, m2, m3, m4, m5, m6,
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally", 
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican", 
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Figure 2 Regression Results - Study 1, with Pooling",
          label="tab:fig_2_pooling",
          star.char = c("+","*","**","***"), 
          star.cutoffs = c(0.1,0.05,0.01,0.001), 
          notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          add.lines = list(c("Sample", "Study 1", "Study 1", "Study 1 Text", "Study 1 Text", "Study 1 Video", "Study 1 Video")),
          style="APSR",
          header=F,
          type="latex",
          font.size="scriptsize",
          out=file.path(base_dir, "Tables/fig_2_table_pooling.tex"))

#Table B19
m1 <- lm(data = ld1 %>% filter(attentiveness==2), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m2 <- lm(data = ld1 %>% filter(attentiveness==2), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
m3 <- lm(data = ld1 %>% filter(attentiveness==2) %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy) 
m4 <- lm(data = ld1 %>% filter(attentiveness==2) %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m5 <- lm(data = ld1 %>% filter(attentiveness==2) %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m6 <- lm(data = ld1 %>% filter(attentiveness==2) %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(m1, m2, m3, m4, m5, m6,
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally", 
                             "Strong Democrat", "Democrat", "Lean Democrat", "Lean Republican", "Republican", 
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Figure 2 Regression Results - Study 1, Attentive, with Pooling",
          label="tab:fig_2_attentive_pooling",
          font.size="tiny",
          star.char = c("+","*","**","***"),
          star.cutoffs = c(0.1,0.05,0.01,0.001),
          notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
          add.lines = list(c("Sample", "Study 1 Att.", "Study 1 Att.", "Study 1 Att. Text", "Study 1 Att. Text", "Study 1 Att. Video", "Study 1 Att. Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/fig_2_table_attentive_pooling.tex"))

#Table B20
m1 <- lm(data = ld4,
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m2 <- lm(data = ld4,
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m3 <- lm(data = ld4 %>% filter(media_format == "Text"),
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m4 <- lm(data = ld4 %>% filter(media_format == "Text"),
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m5 <- lm(data = ld4 %>% filter(media_format == "Video"),
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m6 <- lm(data = ld4 %>% filter(media_format == "Video"),
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(m1, m2, m3, m4, m5, m6,
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat",
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Figure 2 Regression Results - Study 4, with Pooling",
          label="tab:fig_2_replication_pooling",
          star.char = c("+","*","**","***"),
          star.cutoffs = c(0.1,0.05,0.01,0.001),
          notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          add.lines = list(c("Sample", "Study 4", "Study 4", "Study 4 Text", "Study 4 Text", "Study 4 Video", "Study 4 Video")),
          style="APSR",
          header=F,
          type="latex",
          font.size="tiny",
          out=file.path(base_dir, "Tables/fig_2_table_replication_pooling.tex"))

#Table B21
m1 <- lm(data = ld4 %>% filter(attentiveness==2),
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m2 <- lm(data = ld4 %>% filter(attentiveness==2),
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m3 <- lm(data = ld4 %>% filter(attentiveness==2) %>% filter(media_format == "Text"),
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m4 <- lm(data = ld4 %>% filter(attentiveness==2) %>% filter(media_format == "Text"),
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m5 <- lm(data = ld4 %>% filter(attentiveness==2) %>% filter(media_format == "Video"),
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m6 <- lm(data = ld4 %>% filter(attentiveness==2) %>% filter(media_format == "Video"),
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(m1, m2, m3, m4, m5, m6,
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat",
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Figure 2 Regression Results - Study 4, Attentive, with Pooling",
          label="tab:fig_2_replication_attentive_pooling",
          star.char = c("+","*","**","***"),
          star.cutoffs = c(0.1,0.05,0.01,0.001),
          notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          add.lines = list(c("Sample", "Study 4 Att.", "Study 4 Att.", "Study 4 Att. Text", "Study 4 Att. Text", "Study 4 Att. Video", "Study 4 Att. Video")),
          style="APSR",
          header=F,
          type="latex",
          font.size="tiny",
          out=file.path(base_dir, "Tables/fig_2_table_replication_attentive_pooling.tex"))

```


#####Table A4: Heterogeneous Treatment Effects by Attentiveness
```{r het attentive}
#Interact with attentiveness index
hyp_1_att <- lm(data = ld1, support ~ alleg_treatment*attentiveness + party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#Table A4
m1 <- lm(data = ld1, support ~ alleg_treatment*attentiveness + party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(m1, se = starprep(m1),
          covariate.labels=c("Info. Uncertain", "Opp. Rally", "Attentiveness",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Info. Uncertain x Attentiveness",
                             "Opp. Rally x Atteentiveness",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Heterogeneous Treatment Effects by Attentiveness",
          label="tab:het_attentive",
          font.size="tiny",
          star.char = c("+","*","**","***"),
          star.cutoffs = c(0.1,0.05,0.01,0.001),
          notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
          add.lines = list(c("Sample", "Study 1")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/het_attentive_table.tex"))

#p-values of interest
hyp_1_att_p <- tidy(hyp_1_att) %>% filter(term == "alleg_treatmentInfo. Uncertain:attentiveness" | term == "alleg_treatmentOpp. Rally:attentiveness") %>% 
  dplyr::select(p.value)
hyp_1_att_p #0.229 for IU and 0.164 for OR
p.adjust(hyp_1_att_p %>% unlist, method = "BH") #0.229 for both with BH adjustment
```


#####Table A5: Heterogeneous Treatment Effects by Media Literacy
```{r het lit}
#Interact with media literacy index
hyp_1_ml <- lm(data = ld1, support ~ alleg_treatment*media_literacy + party + gender + race + age + education + income + region + digital_literacy)

#Table A5
m1 <- lm(data = ld1, support ~ alleg_treatment*media_literacy + party + gender + race + age + education + income + region + digital_literacy)

stargazer(m1, se = starprep(m1),
          covariate.labels=c("Info. Uncertain", "Opp. Rally", "Media Literacy",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Digital Literacy",
                             "Info. Uncertain x Media Literacy",
                             "Opp. Rally x Media Literacy",
                             "Constant"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="Heterogeneous Treatment Effects by Media Literacy",
          label="tab:het_literacy",
          font.size="tiny",
          star.char = c("+","*","**","***"),
          star.cutoffs = c(0.1,0.05,0.01,0.001),
          notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
          add.lines = list(c("Sample", "Study 1")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/het_literacy_table.tex"))

#p-values of interest
hyp_1_ml_p <- tidy(hyp_1_ml) %>% filter(term == "alleg_treatmentInfo. Uncertain:media_literacy" | term == "alleg_treatmentOpp. Rally:media_literacy") %>% 
  dplyr::select(p.value)
hyp_1_ml_p #0.249 for IU and 0.199 for OR
p.adjust(hyp_1_ml_p %>% unlist, method = "BH") #0.249 for both with BH adjustment

```


#####Table A6: Exploratory Analyses for Informational Uncertainty
```{r explore iu}
#Do effects vary for political moderates?
hyp_1.1_mod <- lm_robust(data = ld1,
                       belief ~ alleg_treatment*moderate +
                         gender + race + age + education + income + region + media_literacy + digital_literacy)

#Assess informational uncertainty through distribution of belief score by treatment group
belief_iu <- ld1$belief[which(ld1$alleg_treatment == "Info. Uncertain")]
belief_control <- ld1$belief[which(ld1$alleg_treatment == "Control")]

#Compare effect of IU treatment to RC treatment
hyp_1.1_robust <- lm_robust(data = ld1,
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#p-values with BH correction
hyp_1.1_mod_p <- tidy(hyp_1.1_mod) %>% filter(term == "alleg_treatmentInfo. Uncertain:moderate") %>% 
  dplyr::select(c(term, p.value)) %>% pull(p.value)

hyp_1.1_ks_p <- ks.test(belief_iu, belief_control)$p.value

hyp_1.1_diff_p <- test_coef_equality(hyp_1.1_robust, "alleg_treatmentInfo. Uncertain", "alleg_treatmentOpp. Rally") %>% unname

hyp_1.1_p <- c(hyp_1.1_mod_p, hyp_1.1_ks_p, hyp_1.1_diff_p)

correct_p <- p.adjust(c(hyp_1.1_p), method = "BH", n = 3)

#Table A6
hyp_1.1_p <- cbind(c("IU*Moderate", "Diff. Belief Distributions", "Diff. ATEs IU vs. OR"),
                   hyp_1.1_p,
                   correct_p) %>% as.tibble
names(hyp_1.1_p) <- c(" ", "Nominal p-value", "Corrected p-value")
hyp_1.1_p$` ` <- c("IU*Independent (ATE for Belief)", "IU vs. Control (Belief Distributions)", "IU vs. OR (ATE for Belief)")
hyp_1.1_p$`Nominal p-value` <- as.numeric(hyp_1.1_p$`Nominal p-value`)
hyp_1.1_p$`Corrected p-value` <- as.numeric(hyp_1.1_p$`Corrected p-value`)
print(xtable(hyp_1.1_p, digits=2, caption="Exploratory Analyses for Informational Uncertainty", label="tab:exploratory_IU"), include.rownames=F, file=file.path(base_dir, "Tables/bh_correction_iu.tex"), caption.placement="top", size="\\small")

```


#####Table A7: Exploratory Analyses for Oppositional Rallying
```{r explore or}
#Do effects vary for strong co-partisans?
hyp_1.2_co <- lm_robust(data = ld1,
                       support ~ alleg_treatment*copartisan +
                         gender + race + age + education + income + region + media_literacy + digital_literacy)

#Compare effect of IU treatment to RC treatment
hyp_1_robust <- lm_robust(data = ld1,
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#p-values with BH correction
hyp_1.2_co_p <- tidy(hyp_1.2_co) %>% filter(term == "alleg_treatmentOpp. Rally:copartisan") %>% 
  dplyr::select(c(term, p.value)) %>% pull(p.value)

hyp_1.2_diff_p <- test_coef_equality(hyp_1_robust, "alleg_treatmentInfo. Uncertain", "alleg_treatmentOpp. Rally") %>% unname

hyp_1.2_p <- c(hyp_1.2_co_p, hyp_1.2_diff_p)

correct_p <- p.adjust(c(hyp_1.2_p), method = "BH", n = 2)

#Table A7
hyp_1.2_p <- cbind(c("OR*Co-Partisan", "Diff. ATEs IU vs. OR"),
                   hyp_1.2_p,
                   correct_p) %>% as.tibble
names(hyp_1.2_p) <- c(" ", "Nominal p-value", "Corrected p-value")
hyp_1.2_p$` ` <- c("OR*Co-partisan (ATE for Support)", "IU vs. OR (ATE for Support)")
hyp_1.2_p$`Nominal p-value` <- as.numeric(hyp_1.2_p$`Nominal p-value`)
hyp_1.2_p$`Corrected p-value` <- as.numeric(hyp_1.2_p$`Corrected p-value`)
print(xtable(hyp_1.2_p, digits=2, caption="Exploratory Analyses for Oppositional Rallying", label="tab:exploratory_OR"), include.rownames=F, file=file.path(base_dir, "Tables/bh_correction_or.tex"), caption.placement="top", size="\\small")

```


#####Table A8: The Impact of Fact-Checking on the Liar's Dividend
```{r fact check}
hyp_1 <- lm(data = ld2, 
                   support_exp1 ~ alleg_treatment_1 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#Table A8
stargazer(hyp_1, se = starprep(hyp_1),
          covariate.labels=c("Info. Uncertain", "IU + Fact Check",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican", "Strong Republican",
                 "Female",
                 "Black", "Hispanic", "Asian", "Other",
                 "Millenials","Gen X","Boomers","Silent",
                 "Some college", "Bachelor's degree", "Graduate degree",
                 "Low income", "High income",
                 "Midwest", "South", "West",
                 "Media Literacy", "Digital Literacy"),
          dep.var.labels = "Politician Support Index",
          keep.stat = c("n","rsq"),
          title="The Impact of Fact-Checking on the Liar's Dividend",
          label="fact_check",
          font.size="scriptsize",
			    star.char = c("+","*","**","***"), 
			    star.cutoffs = c(0.1,0.05,0.01,0.001), 
			    notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
			    add.lines = list(c("Sample", "Study 2")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/followup_exp1_support_regression_table.tex"))

```


#####Table A9: Exploring Informational Uncertainty
```{r iu mechanisms}
#Table A9
df_IU <- ld2 %>% filter(alleg_treatment_1 == "Info. Uncertain")
df_IU$uncertain <- if_else(df_IU$uncertainty >0, 1, 0)
df_IU$believe_alleg <- if_else(df_IU$belief_alleg %in% c(4,5), 1, 0)
df_IU$allege_support <- if_else(df_IU$support_alleg %in% c(4,5), 1, 0)
yes_row <- c(length(which(df_IU$uncertain==1 & df_IU$believe_alleg==1))/length(which(df_IU$believe_alleg==1))*100,
             length(which(df_IU$allege_support==1 & df_IU$believe_alleg==1))/length(which(df_IU$believe_alleg==1))*100)
no_row <- c(length(which(df_IU$uncertain==1 & df_IU$believe_alleg==0))/length(which(df_IU$believe_alleg==0))*100,
             length(which(df_IU$allege_support==1 & df_IU$believe_alleg==0))/length(which(df_IU$believe_alleg==0))*100)
p_row <- c(df_IU %>% t_test(uncertain ~ believe_alleg) %>% pull(p),
           df_IU %>% t_test(allege_support ~ believe_alleg) %>% pull(p))
IU_mech_table <- rbind(no_row, yes_row, p_row) %>% as.data.frame()
IU_mech_table <- cbind(c("No", "Yes", "p-value of difference"), IU_mech_table)
colnames(IU_mech_table) <- c("Believe Allegation", "Pct. Hard to Know What's True", "Pct. Alleg. Affects Support")
options(scipen=999)
print(xtable(IU_mech_table, digits=2, caption="Exploring Informational Uncertainty", label="tab:exploring_IU"), include.rownames=F, file=file.path(base_dir, "Tables/exploring_iu.tex"), caption.placement="top", size="\\small")

```


#####Table A10: Factors Related to Susceptibility to Informational Uncertainty
```{r iu factors}
#Table A10
df_IU <- df_IU %>% mutate(support_alleg_binary = if_else(support_alleg == 5 | support_alleg == 4, 1, 0) )
df_IU$party <- as.numeric(fct_relevel(df_IU$party, "Independent", after = 3))

alt_IU_channels <- df_IU %>% group_by(support_alleg_binary) %>% 
  get_summary_stats(c(accountability, cancel_culture, concern_FN, detect_FN, offensive, partisan_1, party, political_correctness) , type = "mean_sd")
alt_IU_channels <- alt_IU_channels %>% 
  pivot_wider(id_cols = variable, names_from = support_alleg_binary, values_from = c(mean))

alt_IU_channels_long <- df_IU %>% 
  dplyr::select(c(support_alleg_binary, 
           accountability, cancel_culture, concern_FN, detect_FN, offensive, partisan_1, party, political_correctness)) %>% pivot_longer(-support_alleg_binary, names_to = "variable", values_to = "value")

alt_IU_channels$pval <- alt_IU_channels_long %>% group_by(variable) %>% t_test(value ~ support_alleg_binary) %>% pull(p)
colnames(alt_IU_channels) <- c("Covariate", "No Support Increase", "Support Increase", "p-value of Diff.")
alt_IU_channels$Covariate <- c("Prefer Accountability", "Cancel Culture is a Problem", "Concerned about Fake News", "Can Detect Fake News", "Find Story Offensive", "Co-partisan", "Republican", "Favor Political Correctness")
print(xtable(alt_IU_channels, digits=2, caption="Factors Related to Susceptibility to Informational Uncertainty", label="tab:wave_two_factors"), include.rownames=F, file=file.path(base_dir, "Tables/iu_factors.tex"), caption.placement="top", size="\\footnotesize")

```


#####Pilot Stats Reported in SM Appendix Section B.13
```{r pilot}
#Did treatment affect partisanship responses in pilot?
pilot$party_numeric <- case_when(
  pilot$party=="Strong Democrat" ~ 1,
  pilot$party=="Democrat" ~ 2,
  pilot$party=="Lean Democrat" ~ 3,
  pilot$party=="Independent" ~ 4,
  pilot$party=="Lean Republican" ~ 5,
  pilot$party=="Republican" ~ 6,
  pilot$party=="Strong Republican" ~ 7
)
m1 <- summary(lm(data=pilot, party_numeric ~ alleg_treatment))
pf(m1$fstatistic[1], m1$fstatistic[2], m1$fstatistic[3], lower.tail=F) #0.675

#Did treatment affect media literacy responses in pilot?
m2 <- summary(lm(data=pilot, media_literacy_index ~ alleg_treatment))
pf(m2$fstatistic[1], m2$fstatistic[2], m2$fstatistic[3], lower.tail=F) #0.659

#Did treatment affect digital literacy responses in pilot?
m3 <- summary(lm(data=pilot, familiar_df ~ alleg_treatment))
pf(m3$fstatistic[1], m3$fstatistic[2], m3$fstatistic[3], lower.tail=F) #0.179

```


#####Table B36: Impacts on Politician Support (Text Treatments)
#####Table B37: Impacts on Politician Support (Video Treatments)
#####Table B38: Impacts on Belief in Scandal (Text Treatments)
#####Table B39: Impacts on Belief in Scandal (Video Treatments)
#####Table B40: Impacts on Trust in Media (Text Treatments)
#####Table B41: Impacts on Trust in Media (Video Treatments)
```{r extra tables by outcome and media}
#Table B40
ld2_trust <- ld2
ld2_trust$trust <- ld2_trust$trust_exp1
ld2_trust$alleg_treatment <- ld2_trust$alleg_treatment_1

study_1_trust <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   trust ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_2_trust <- lm(data = ld2_trust, 
                   trust ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_trust <- lm(data = ld4 %>% filter(media_format == "Text"), 
                   trust ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_5_trust <- lm(data = ld5, 
                   trust ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)


#Create regression table
stargazer(study_1_trust, study_2_trust, study_4_trust, study_5_trust, 
          se = starprep(study_1_trust, study_2_trust, study_4_trust, study_5_trust),
          omit = c("Fact Check"),
          covariate.labels=c("Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Trust in Media Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Trust in Media (Text Treatments)",
          label="tab:trust_table_text",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Text", "Study 2", "Study 4 Text", "Study 5")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/trust_table_text.tex"))

#Table B41
study_1_trust <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   trust ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_trust <- lm(data = ld4 %>% filter(media_format == "Video"), 
                   trust ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#Create regression table
stargazer(study_1_trust, study_4_trust, 
          se = starprep(study_1_trust, study_4_trust),
          omit = c("Fact Check"),
          covariate.labels=c("Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Trust in Media Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Trust in Media (Video Treatments)",
          label="tab:trust_table_video",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Video", "Study 4 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/trust_table_video.tex"))



#Table B38
ld2_belief <- ld2
ld2_belief$belief <- ld2_belief$belief_exp1
ld2_belief$alleg_treatment <- ld2_belief$alleg_treatment_1

study_1_belief <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_2_belief <- lm(data = ld2_belief, 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_belief <- lm(data = ld4 %>% filter(media_format == "Text"), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_5_belief <- lm(data = ld5, 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)


#Create regression table
stargazer(study_1_belief, study_2_belief, study_4_belief, study_5_belief, 
          se = starprep(study_1_belief, study_2_belief, study_4_belief, study_5_belief),
          omit = c("Fact Check"),
          covariate.labels=c("Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Belief Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Belief in Scandal (Text Treatments)",
          label="tab:belief_table_text",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Text", "Study 2", "Study 4 Text", "Study 5")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/belief_table_text.tex"))

#Table B39
study_1_belief <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_belief <- lm(data = ld4 %>% filter(media_format == "Video"), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#Create regression table
stargazer(study_1_belief, study_4_belief, 
          se = starprep(study_1_belief, study_4_belief),
          omit = c("Fact Check"),
          covariate.labels=c("Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Belief Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Belief in Scandal (Video Treatments)",
          label="tab:belief_table_video",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Video", "Study 4 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/belief_table_video.tex"))



#Table B36
ld2_support <- ld2
ld2_support$support <- ld2_support$support_exp1
ld2_support$alleg_treatment <- ld2_support$alleg_treatment_1

study_1_support <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_2_support <- lm(data = ld2_support, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_support <- lm(data = ld4 %>% filter(media_format == "Text"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_5_support <- lm(data = ld5, 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)


#Create regression table
stargazer(study_1_support, study_2_support, study_4_support, study_5_support, 
          se = starprep(study_1_support, study_2_support, study_4_support, study_5_support),
          omit = c("Fact Check"),
          covariate.labels=c("Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Support Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Politician Support (Text Treatments)",
          label="tab:support_table_text",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Text", "Study 2", "Study 4 Text", "Study 5")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/support_table_text.tex"))

#Table B37
study_1_support <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_support <- lm(data = ld4 %>% filter(media_format == "Video"), 
                   support ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#Create regression table
stargazer(study_1_support, study_4_support, 
          se = starprep(study_1_support, study_4_support),
          omit = c("Fact Check"),
          covariate.labels=c("Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Support Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Politician Support (Video Treatments)",
          label="tab:support_table_video",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Video", "Study 4 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/support_table_video.tex"))

```


#####Table B42: Impacts on Politician Support (Text Treatments, Pooled Allegation Treatment)
#####Table B43: Impacts on Politician Support (Video Treatments, Pooled Allegation Treatment)
#####Table B44: Impacts on Belief in Scandal (Text Treatments, Pooled Allegation Treatment)
#####Table B45: Impacts on Belief in Scandal (Video Treatments, Pooled Allegation Treatment)
#####Table B46: Impacts on Trust in Media (Text Treatments, Pooled Allegation Treatment)
#####Table B47: Impacts on Trust in Media (Video Treatments, Pooled Allegation Treatment)
```{r extra tables by outcome and media with allegation}
#Table B46
ld2_trust <- ld2
ld2_trust$trust <- ld2_trust$trust_exp1
ld2_trust$treatment <- if_else(ld2_trust$alleg_treatment_1 != "Control", 1, 0)

study_1_trust <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   trust ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_2_trust <- lm(data = ld2_trust, 
                   trust ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_trust <- lm(data = ld4 %>% filter(media_format == "Text"), 
                   trust ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_5_trust <- lm(data = ld5, 
                   trust ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)


#Create regression table
stargazer(study_1_trust, study_2_trust, study_4_trust, study_5_trust, 
          se = starprep(study_1_trust, study_2_trust, study_4_trust, study_5_trust),
          omit = c("Fact Check"),
          covariate.labels=c("Allegation",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Trust in Media Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Trust in Media (Text Treatments, Pooled Allegation Treatment)",
          label="tab:trust_table_text_allegation",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Text", "Study 2", "Study 4 Text", "Study 5")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/trust_table_text_allegation.tex"))

#Table B47
study_1_trust <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   trust ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_trust <- lm(data = ld4 %>% filter(media_format == "Video"), 
                   trust ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#Create regression table
stargazer(study_1_trust, study_4_trust, 
          se = starprep(study_1_trust, study_4_trust),
          omit = c("Fact Check"),
          covariate.labels=c("Allegation",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Trust in Media Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Trust in Media (Video Treatments, Pooled Allegation Treatment)",
          label="tab:trust_table_video_allegation",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Video", "Study 4 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/trust_table_video_allegation.tex"))



#Table B44
ld2_belief <- ld2
ld2_belief$belief <- ld2_belief$belief_exp1
ld2_belief$treatment <- if_else(ld2_belief$alleg_treatment_1 != "Control", 1, 0)

study_1_belief <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_2_belief <- lm(data = ld2_belief, 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_belief <- lm(data = ld4 %>% filter(media_format == "Text"), 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_5_belief <- lm(data = ld5, 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)


#Create regression table
stargazer(study_1_belief, study_2_belief, study_4_belief, study_5_belief, 
          se = starprep(study_1_belief, study_2_belief, study_4_belief, study_5_belief),
          omit = c("Fact Check"),
          covariate.labels=c("Allegation",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Belief Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Belief in Scandal (Text Treatments, Pooled Allegation Treatment)",
          label="tab:belief_table_text_allegation",
				  font.size = "tiny",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Text", "Study 2", "Study 4 Text", "Study 5")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/belief_table_text_allegation.tex"))

#Table B45
study_1_belief <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_belief <- lm(data = ld4 %>% filter(media_format == "Video"), 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#Create regression table
stargazer(study_1_belief, study_4_belief, 
          se = starprep(study_1_belief, study_4_belief),
          omit = c("Fact Check"),
          covariate.labels=c("Allegation",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Belief Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Belief in Scandal (Video Treatments, Pooled Allegation Treatment)",
          label="tab:belief_table_video_allegation",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Video", "Study 4 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/belief_table_video_allegation.tex"))



#Table B42
ld2_support <- ld2
ld2_support$support <- ld2_support$support_exp1
ld2_support$treatment <- if_else(ld2_support$alleg_treatment_1 != "Control", 1, 0)

study_1_support <- lm(data = ld1 %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_2_support <- lm(data = ld2_support, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_support <- lm(data = ld4 %>% filter(media_format == "Text"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_5_support <- lm(data = ld5, 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)


#Create regression table
stargazer(study_1_support, study_2_support, study_4_support, study_5_support, 
          se = starprep(study_1_support, study_2_support, study_4_support, study_5_support),
          omit = c("Fact Check"),
          covariate.labels=c("Allegation",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Support Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Politician Support (Text Treatments, Pooled Allegation Treatment)",
          label="tab:support_table_text_allegation",
				  font.size = "tiny",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Text", "Study 2", "Study 4 Text", "Study 5")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/support_table_text_allegation.tex"))

#Table B43
study_1_support <- lm(data = ld1 %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

study_4_support <- lm(data = ld4 %>% filter(media_format == "Video"), 
                   support ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

#Create regression table
stargazer(study_1_support, study_4_support, 
          se = starprep(study_1_support, study_4_support),
          omit = c("Fact Check"),
          covariate.labels=c("Allegation",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels.include = F,
				  column.labels = c("Support Index"),
          column.separate = c(4),
          keep.stat = c("n","rsq"),
          title="Impacts on Politician Support (Video Treatments, Pooled Allegation Treatment)",
          label="tab:support_table_video_allegation",
				  font.size = "scriptsize",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 1 Video", "Study 4 Video")),
          header=F,
          type="latex",
          out=file.path(base_dir, "Tables/support_table_video_allegation.tex"))

```


#####Table A11: Study 3 Heterogeneous Effects
```{r study 3 additional pre-reg}
#Table A11
ld3$alleg_treatment_3 <- factor(ld3$alleg_treatment, levels = c("Apology","Info. Uncertain", "Simple Denial"))

m1 <- lm(data = ld3, support ~ alleg_treatment_3*factor(partisan, levels=c(1, 0, -1)) + relevel(factor(party_3), ref="Republican") + gender + race + age + education + income + region + media_literacy + digital_literacy)

m2 <- lm(data = ld3, support ~ alleg_treatment_3*relevel(factor(party_3), ref="Republican") + gender + race + age + education + income + region + media_literacy + digital_literacy)

m3 <- lm(data = ld3, belief ~ alleg_treatment_3*factor(partisan, levels=c(1, 0, -1)) + relevel(factor(party_3), ref="Republican") + gender + race + age + education + income + region + media_literacy + digital_literacy)

m4 <- lm(data = ld3, belief ~ alleg_treatment_3*relevel(factor(party_3), ref="Republican") + gender + race + age + education + income + region + media_literacy + digital_literacy)

m5 <- lm(data = ld3, trust ~ alleg_treatment_3*factor(partisan, levels=c(1, 0, -1)) + relevel(factor(party_3), ref="Republican") + gender + race + age + education + income + region + media_literacy + digital_literacy)

m6 <- lm(data = ld3, trust ~ alleg_treatment_3*relevel(factor(party_3), ref="Republican") + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(m1, m2, m3, m4, m5, m6, 
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Info. Uncertain", "Simple Denial",
                             "Independent", "Out-Partisan",
                             "No Party", "Democrat",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "IU x Independent", "Denial x Independent",
                             "IU x Out-Partisan", "Denial x Out-Partisan",
                             "IU x No Party", "Denial x No Party",
                             "IU x Democrat", "Denial x Democrat",
                             "Constant"),
          dep.var.labels = c("Support Index", "Belief Index", "Trust Index"),
          keep.stat = c("n","rsq"),
          title="Study 3 Heterogeneous Effects",
          label="tab:study_3_het_effects",
          font.size="tiny",
          star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
          notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 3", "Study 3", "Study 3", "Study 3", "Study 3", "Study 3")),
          header=F,
          type="latex",
				  out=file.path(base_dir, "Tables/study_3_het_effects.tex"))

```


#####Table A12: Study 4 Support Results with Alternative Support Index
```{r study 4 additional pre-reg}
#Table A12
m1 <- lm(data = ld4, 
                   support_nodonation ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

m2 <- lm(data = ld4, 
                   support_nodonation ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

m3 <- lm(data = ld4 %>% filter(media_format=="Text"), 
                   support_nodonation ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

m4 <- lm(data = ld4 %>% filter(media_format=="Text"), 
                   support_nodonation ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

m5 <- lm(data = ld4 %>% filter(media_format=="Video"), 
                   support_nodonation ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

m6 <- lm(data = ld4 %>% filter(media_format=="Video"), 
                   support_nodonation ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(m1, m2, m3, m4, m5, m6,
          se = starprep(m1, m2, m3, m4, m5, m6),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Support Index Without Donation",
          keep.stat = c("n","rsq"),
          title="Study 4 Support Results with Alternative Support Index",
          label="tab:study_4_support_nodonation",
          font.size="tiny",
				  star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 4 All", "Study 4 All", "Study 4 Text", "Study 4 Text", "Study 4 Video", "Study 4 Video")),
          header=F,
          type="latex",
				  out=file.path(base_dir, "Tables/study_4_support_nodonation.tex"))


```


#####Table A13: Study 5 Belief Results Controlling for Pre Belief Measure
#####Table A14: Study 5 Belief Change Regression Results
#####Table A15: Study 5 Belief Results - Heterogeneous Effects
```{r study 5 additional pre-reg}
#Table A13
m1 <- lm(data = ld5, 
                   belief_new ~ treatment + belief_1 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m2 <- lm(data = ld5 %>% filter(attentiveness==2), 
                   belief_new ~ treatment + belief_1 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m3 <- lm(data = ld5, 
                   belief_new ~ alleg_treatment + belief_1 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m4 <- lm(data = ld5 %>% filter(attentiveness==2), 
                   belief_new ~ alleg_treatment + belief_1 +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(m1, m2, m3, m4,
          se = starprep(m1, m2, m3, m4),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally", "Pre Belief",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Post Belief in Scandal",
          keep.stat = c("n","rsq"),
          title="Study 5 Belief Results Controlling for Pre Belief Measure",
          label="tab:study_5_belief_control",
          font.size="tiny",
				  star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 5", "Study 5 Att.", "Study 5", "Study 5 Att.")),
          header=F,
          type="latex",
				  out=file.path(base_dir, "Tables/study_5_belief_control.tex"))


#Table A14
m1 <- lm(data = ld5, 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m2 <- lm(data = ld5 %>% filter(attentiveness==2), 
                   belief ~ treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m3 <- lm(data = ld5, 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)
m4 <- lm(data = ld5 %>% filter(attentiveness==2), 
                   belief ~ alleg_treatment +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

stargazer(m1, m2, m3, m4,
          se = starprep(m1, m2, m3, m4),
          covariate.labels=c("Allegation", "Info. Uncertain", "Opp. Rally",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "Constant"),
          dep.var.labels = "Change in Belief",
          keep.stat = c("n","rsq"),
          title="Study 5 Belief Change Regression Results",
          label="tab:study_5_belief_change",
          font.size="tiny",
				  star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 5", "Study 5 Att.", "Study 5", "Study 5 Att.")),
          header=F,
          type="latex",
				  out=file.path(base_dir, "Tables/study_5_belief_change.tex"))


#Table A15
copart_belief <- lm(data = ld5,
                   belief_new ~ alleg_treatment*factor(partisan, levels=c(0, 1, -1)) +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

embarrass_belief <- lm(data = ld5,
                   belief_new ~ alleg_treatment*reputation +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

att_belief <- lm(data = ld5,
                   belief_new ~ alleg_treatment*attentiveness +
                     party + gender + race + age + education + income + region + media_literacy + digital_literacy)

literacy_belief <- lm(data = ld5,
                   belief_new ~ alleg_treatment*media_literacy +
                     party + gender + race + age + education + income + region + digital_literacy)

stargazer(copart_belief, embarrass_belief, att_belief, literacy_belief,
          se = starprep(copart_belief, embarrass_belief, att_belief, literacy_belief),
          covariate.labels=c("Info. Uncertain", "Opp. Rally",
                             "Co-Partisan", "Out-Partisan",
                             "Embarrassing", "Attentive",
                             "Strong Democrat", "Democrat", "Lean Democrat", 
                             "Lean Republican", "Republican",
                             "Strong Republican",
                             "Female",
                             "Black", "Hispanic", "Asian", "Other Race",
                             "Millennial", "Gen X", "Boomer", "Silent Gen.",
                             "Some College", "Bachelor's Degree", "Graduate Degree",
                             "Low Income", "High Income",
                             "Midwest", "South", "West",
                             "Media Literacy",
                             "Digital Literacy",
                             "IU x Co-Partisan", "OR x Co-Partisan",
                             "IU x Out-Partisan", "OR x Out-Partisan",
                             "IU x Embarrassing", "OR x Embarrassing",
                             "IU x Attentive", "OR x Attentive",
                             "IU x Media Literacy", "OR x Media Literacy",
                             "Constant"),
          dep.var.labels = "Post Belief in Scandal",
          keep.stat = c("n","rsq"),
          title="Study 5 Belief Results - Heterogeneous Effects",
          label="tab:study_5_belief_interactions",
          font.size="tiny",
				  star.char = c("+","*","**","***"), 
				  star.cutoffs = c(0.1,0.05,0.01,0.001), 
				  notes = c("$^{+}$p $<$ .1; $^{*}$p $<$ .05; $^{**}$p $<$ .01; $^{***}$p $<$ .001"),
				  notes.append = F,
          style="APSR",
				  add.lines = list(c("Sample", "Study 5", "Study 5 Att.", "Study 5", "Study 5 Att.")),
          header=F,
          type="latex",
				  out=file.path(base_dir, "Tables/study_5_belief_interactions.tex"))

#Is belief in the allegation correlated with belief change?
cor(ld5$belief[ld5$alleg_treatment!="Control"], ld5$belief_alleg[ld5$alleg_treatment!="Control"]) #-0.07

```
